Construct a buffer representing the provided array of bytes.
Construct a buffer representing the provided array of bytes, delimited
by the indices from
inclusive and until
exclusive: [begin, end)
.
Construct a buffer representing the provided array of bytes, delimited
by the indices from
inclusive and until
exclusive: [begin, end)
.
Out of bounds indices are truncated. Negative indices are not accepted.
Get a reference to a Buf's data as an array of bytes.
Get a reference to a Buf's data as an array of bytes.
A copy may be performed if necessary.
Extract the buffer's underlying offsets and array of bytes.
Non-copying constructors and extractors for Buf.ByteArray.
The "owned" APIs may provide direct access to a Buf's underlying implementation; and so mutating the underlying data structure invalidates a Buf's immutability constraint. Users must take care to handle this data immutably.
Shared for analogs that make defensive copies.