pub struct MessageEncoder<A: Attribute> { /* private fields */ }
Expand description

Message encoder.

Implementations

Makes a new MessageEncoder instance.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The type of items to be encoded.

Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more

Tries to start encoding the given item. Read more

Returns the number of bytes required to encode all the items in the encoder. Read more

Returns true if there are no items to be encoded in the encoder, otherwise false. Read more

Returns the exact number of bytes required to encode all the items remaining in the encoder.

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

Creates a new encoder instance that has the given initial item. Read more

Creates an encoder for modifying encoding errors produced by self. Read more

Creates an encoder that converts items into ones that suited to the self encoder by calling the given function. Read more

Creates an encoder that tries to convert items into ones that suited to the self encoder by calling the given function. Read more

Creates an encoder that represents an optional encoder. Read more

Creates an encoder that will fail if the number of encoded bytes of an item exceeds n. Read more

Creates an encoder that required to encode each item exactly at the specified number of bytes. Read more

Takes two encoders and creates a new encoder that encodes both items in sequence. Read more

Creates an encoder that repeats encoding of Self::Item. Read more

Creates an encoder that pre-encodes items when start_encoding method is called. Read more

Creates an encoder that makes it possible to slice the encoded byte sequence in arbitrary units. Read more

Creates an encoder that cannot accept any more items except the given one.

Encodes the given item and returns the resulting bytes. 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.

Encodes the items remaining in the encoder and writes the encoded bytes to the given write buffer. Read more

Encodes all of the items remaining in the encoder and writes the encoded bytes to the given writer. Read more

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.