Trait AsyncSerializeRef

Source
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ยง

Source

type Serialized

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

The type of values serialized.

Required Methodsยง

Source

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.

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.

Implementorsยง