Trait AsyncDecoder

Source
pub trait AsyncDecoder {
    type Item;
    type Error: From<Error>;
    type DecodeFuture<'a>: Future<Output = Result<Option<Self::Item>, Self::Error>>
       where Self: 'a;

    // Required method
    fn decode<IO>(&mut self, src: &mut IO) -> Self::DecodeFuture<'_>;
}

Required Associated Types§

Source

type Item

Source

type Error: From<Error>

Source

type DecodeFuture<'a>: Future<Output = Result<Option<Self::Item>, Self::Error>> where Self: 'a

Required Methods§

Source

fn decode<IO>(&mut self, src: &mut IO) -> Self::DecodeFuture<'_>

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§