pub trait AsDecoder {
type Cx: Context<Error = Self::Error, Allocator = Self::Allocator>;
type Error;
type Allocator: Allocator;
type Mode: 'static;
type Decoder<'this>: Decoder<'this, Cx = Self::Cx, Error = Self::Error, Allocator = Self::Allocator, Mode = Self::Mode>
where Self: 'this;
// Required method
fn as_decoder(&self) -> Result<Self::Decoder<'_>, Self::Error>;
}Expand description
Trait that allows a type to be repeatedly coerced into a decoder.
Required Associated Types§
Required Methods§
Sourcefn as_decoder(&self) -> Result<Self::Decoder<'_>, Self::Error>
fn as_decoder(&self) -> Result<Self::Decoder<'_>, Self::Error>
Borrow self as a new decoder.
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.