pub trait AsyncSerialize<W: AsyncWrite>: AsyncWriterFuture<W> {
type Serialized;
// Required method
fn from_val(writer: W, val: Self::Serialized) -> Self;
}
๐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 into a wrapped AsyncWrite and then returns the wrapped AsyncWrite and how many bytes were written.
Required Associated Typesยง
Sourcetype Serialized
๐Deprecated: This was a failed attempt at finding a suitable abstraction. The async-codec crate might be what you need instead.
type Serialized
The type of values serialized.
Required Methodsยง
Sourcefn from_val(writer: W, val: Self::Serialized) -> Self
๐Deprecated: This was a failed attempt at finding a suitable abstraction. The async-codec crate might be what you need instead.
fn from_val(writer: W, val: Self::Serialized) -> Self
Create a new instance, consuming the value to serialize and wrapping the AsyncWrite
to
serialize into.
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.