pub trait AsyncSerializeRef<'val, W: AsyncWrite>: AsyncWriterFuture<W> {
type Serialized;
// Required method
fn from_ref(writer: W, val: &'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 by reference into a wrapped AsyncWrite.
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_ref(writer: W, val: &'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_ref(writer: W, val: &'val Self::Serialized) -> Self
Create a new instance, taking a reference to 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.