pub trait Decoder<'a>: Sized {
// Required methods
fn decode<T: DecoderValue<'a> + DecoderValueMut<'a>>(
self,
) -> Result<(T, Self), DecoderError>;
fn decode_slice(self, len: usize) -> Result<(Self, Self), DecoderError>;
}Expand description
A generic interface over a decoder buffer
Required Methods§
fn decode<T: DecoderValue<'a> + DecoderValueMut<'a>>( self, ) -> Result<(T, Self), DecoderError>
fn decode_slice(self, len: usize) -> Result<(Self, Self), DecoderError>
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.