logo
pub struct WriteCounter { /* private fields */ }
Expand description

A WriteContext implementation that just counts the bytes written.

Implementations

Create a new, empty WriteCounter

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.