Trait AsyncDeserialize

Source
pub trait AsyncDeserialize<R: AsyncRead, S, E>: Future<Item = (R, S, usize), Error = (R, DeserializeError<E>)> {
    // Required methods
    fn from_reader(reader: R) -> Self;
    fn already_read(&self) -> usize;
}
๐Ÿ‘ŽDeprecated: This was a failed attempt at finding a suitable abstraction. The async-codec crate might be what you need instead.
Expand description

A future that asynchronously serializes something from a wrapped AsyncRead and then returns the wrapped AsyncRead, the deserialized value, and how many bytes were read.

Required Methodsยง

Source

fn from_reader(reader: R) -> Self

๐Ÿ‘ŽDeprecated: This was a failed attempt at finding a suitable abstraction. The async-codec crate might be what you need instead.

Consume a reader to create an AsyncDeserialize.

Source

fn already_read(&self) -> usize

๐Ÿ‘ŽDeprecated: This was a failed attempt at finding a suitable abstraction. The async-codec crate might be what you need instead.

Return how many bytes have already been read.

Dyn Compatibilityยง

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementorsยง