pub struct WriteBuffer { /* private fields */ }
Expand description

An in-memory buffer that implements WriteContext.

Implementations

Create a new, empty WriteBuffer

Retrieve a slice of the data held by this buffer

Returns the current size of the data held by this buffer

Consume self and return the inner buffer

Trait Implementations

Write a slice of bytes to a WriteContext.
Write the specified number of zero bytes to the WriteContext.
The total number of bytes written so far.
Consumes the placeholder and writes the supplied value into it
Write a ReadArray instance to a WriteContext.
Write a Vec into a WriteContext.
Return a placeholder to T in the context for filling in later.
Reserve space for count bytes in the context for filling in later.
Return a Vec of count placeholders of type T.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.