Construct a buffer representing a copy of the entire byte array.
Construct a buffer representing a copy of the array of bytes, delimited
by the indices from
inclusive and until
exclusive: [begin, end)
.
Construct a buffer representing a copy of the 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 copy of a a Buf's data as an array of bytes.
Extract a copy of the buffer's underlying array of bytes.
Copying constructors and extractors for Buf.ByteArray.
A "shared" Buf means that steps are taken to ensure that the produced Buf shares no state with the producer. This typically implies defensive copying and should be used when you do not control the lifecycle or usage of the passed in data.
Owned for analogs that do not make defensive copies.