Growable byte buffers with explicit ownership and initialized length.
Types
Buffer! | Growable byte buffer with an explicit owner and initialized length. |
BufferRestore! | The way back from Buffer!::open to a growable Buffer!. |
Instances
Writer[Buffer!] | A buffer as a writer: every write appends, growing first if needed. |
Hash[Buffer!] | Hashes the buffer's bytes in order. |
Eq[Buffer!, Buffer!] | Byte equality of two buffers. |
Eq[Buffer!, Readable[C, S]] | A buffer equals a borrowed view with the same bytes, which lets a map keyed by Buffer! be searched with a view (HashMap!::find). |
Ord[Buffer!, Buffer!] | Buffers order by their bytes, as unsigned values, a shorter prefix first. |
Instance declarations
instance Writer[Buffer!]source
instance Writer[Buffer!] { ... }
A buffer as a writer: every write appends, growing first if needed.
Infallible: Buffer! aborts on out-of-memory.
instance Hash[Buffer!]source
instance Hash[Buffer!] { ... }
Hashes the buffer's bytes in order.
A buffer hashes and compares by its contents, so it can key a map.
instance Eq[Buffer!, Buffer!]source
instance Eq[Buffer!, Buffer!] { ... }
Byte equality of two buffers.
instance Eq[Buffer!, Readable[C, S]]source
forall C, S where ReadBytes[C, S], Copy[S].
instance Eq[Buffer!, Readable[C, S]] { ... }
A buffer equals a borrowed view with the same bytes, which lets a map keyed by Buffer! be searched with a view (HashMap!::find). The two Hash instances agree: both hash the bytes in order.
instance Ord[Buffer!, Buffer!]source
instance Ord[Buffer!, Buffer!] { ... }
Buffers order by their bytes, as unsigned values, a shorter prefix first.
Blanket methods
method collect_bytessource
fn collect_bytes(self) -> (I, Buffer!) { ... }
In forall I where Iterator[I -> u8].
The iterator's remaining bytes, in order, in a new buffer.