package containers
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=0f70824867269c02bf01ae12206aa47a6f669d69f1954c19e68ece9f444f1cba
sha512=11de2d7b7173659e6b83c487ac116a93d4b780b86da07386e7604f8fd45f6841e93cba59dba59ed7dbf6e1bc26561202ae1d2e7238a12f588dfd557d4f2da589
doc/containers/CCByte_buffer/index.html
Module CCByte_bufferSource
Byte buffer.
A dynamic vector of bytes that doesn't hide its internal from you. Same use case as Buffer.t but with more power.
type t = {mutable bs : bytes;(*The backing bytes buffer
*)mutable len : int;(*Length of the "active" slice in
*)bs. The actual content of the buffer isbs[0]..bs[len-1]. What comes after is undefined garbage.
}The byte buffer. The definition is public since 3.13.1 .
Access the underlying byte buffer. This buffer can change after operations that affect the capacity (e.g. add_char).
ensure_free buf n ensures that the free space at the end of the buffer is at least n.
shrink_to buf n reduces length buf to at most n. Does nothing if the length is already <= n.
Set the char at the given offset, unsafe (no bound check)
to_slice buf returns a slice of the current content. The slice shares the same byte array as buf (until buf is resized).