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§
type Item
type Error: From<Error>
type DecodeFuture<'a>: Future<Output = Result<Option<Self::Item>, Self::Error>> where Self: 'a
Required Methods§
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.