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ยง
Sourcefn 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.
fn from_reader(reader: R) -> Self
Consume a reader to create an AsyncDeserialize
.
Sourcefn 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.
fn already_read(&self) -> usize
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.