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

Writebuffer guarded by a Token

Implementations

Construct a new TokenBuffer from a mutable slice of bytes and a token

Consume the buffer, returning the held token

Return bytes that have been written into the tokenbuffer

Return bytes that have not yet been written

Safety

It is up to the caller to assure that Only one mutable reference may exist at a time

Bump the buffer pointer forward, and reduce the internal count of written bytes.

Returns the amount of bytes written into the lbuffer

Remap TokenBuffer to the provided bytesg

Trait Implementations

Converts this type into a mutable reference of the (usually inferred) input type.

The error produced by any failing methods.

Returns the current position of the serializer.

Attempts to write the given bytes to the serializer.

Advances the given number of bytes as padding.

Aligns the position of the serializer to the given alignment.

Aligns the position of the serializer to be suitable to write the given type.

Resolves the given value with its resolver and writes the archived type. Read more

Archives the given object and returns the position it was archived at.

Resolves the given reference with its resolver and writes the archived reference. Read more

Archives a reference to the given object and returns the position it was archived at.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Returns the argument unchanged.

Calls U::from(self).

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

Gets the layout of the type.

The type for metadata in pointers and references to Self.

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.