#[non_exhaustive]
pub struct MessageFrameDecoder { /* private fields */ }
Expand description

Streaming decoder for decoding a Message from a stream.

Implementations§

Returns a new MessageFrameDecoder.

Attempts to decode a Message from the given buffer. This function expects to be called over and over again with more data in the buffer each time its called. When there’s not enough data to decode a message, it returns Ok(None).

Once there is enough data to read a message prelude, then it will mutate the Buf position. The state from the reading of the prelude is stored in the decoder so that the next call will be able to decode the entire message, even though the prelude is no longer available in the Buf.

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

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.