pub trait AsyncWireFormatExtwhere
Self: WireFormat + Send,{
// Provided methods
fn encode_async<W>(self, writer: W) -> impl Future<Output = Result<()>>
where Self: Sync + Sized,
W: AsyncWrite + Unpin + Send { ... }
fn decode_async<R>(reader: R) -> impl Future<Output = Result<Self>> + Send
where Self: Sync + Sized,
R: AsyncRead + Unpin + Send { ... }
}
Expand description
Extension trait for asynchronous wire format encoding and decoding.
Provided Methods§
Sourcefn encode_async<W>(self, writer: W) -> impl Future<Output = Result<()>>
fn encode_async<W>(self, writer: W) -> impl Future<Output = Result<()>>
Sourcefn decode_async<R>(reader: R) -> impl Future<Output = Result<Self>> + Send
fn decode_async<R>(reader: R) -> impl Future<Output = Result<Self>> + Send
Implementors§
impl<T: WireFormat + Send> AsyncWireFormatExt for T
Implements the AsyncWireFormatExt
trait for types that implement the WireFormat
trait and can be sent across threads.