Trait diny::AsyncSerialize [−][src]
pub trait AsyncSerialize: Encodable {
type Future: Future + Unpin;
fn serialize<F, W>(
&'w self,
format: &'w F,
writer: &'w mut W
) -> Self::Future
where
F: FormatSerialize,
W: AsyncWrite + Unpin;
}
Expand description
Serialize a data structure asynchronously.
Associated Types
Required methods
fn serialize<F, W>(&'w self, format: &'w F, writer: &'w mut W) -> Self::Future where
F: FormatSerialize,
W: AsyncWrite + Unpin,
fn serialize<F, W>(&'w self, format: &'w F, writer: &'w mut W) -> Self::Future where
F: FormatSerialize,
W: AsyncWrite + Unpin,
Attempt to serialize the type asynchronously for the indicated format via the provided asynchronous writer.