Trait AsyncSerialize

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

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_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.

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.

Implementorsยง