pub trait Decode<'a> {
type Value: Sized;
// Required methods
fn decode(buf: &'a [u8]) -> Result<(Self::Value, &'a [u8]), Error>;
fn decode_with_format(
format: Format,
buf: &'a [u8],
) -> Result<(Self::Value, &'a [u8]), Error>;
}
Required Associated Types§
Required Methods§
fn decode(buf: &'a [u8]) -> Result<(Self::Value, &'a [u8]), Error>
fn decode_with_format( format: Format, buf: &'a [u8], ) -> Result<(Self::Value, &'a [u8]), Error>
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.