pub trait Decodable: Sized {
type Error: Error;
type Cond;
// Required method
fn decode_with<R: Read>(
reader: &mut R,
cond: Self::Cond,
) -> Result<Self, Self::Error>;
// Provided method
fn decode<R: Read>(reader: &mut R) -> Result<Self, Self::Error>
where Self::Cond: Default { ... }
}
Expand description
Methods for decoding bytes to an Object according to MQTT specification
Required Associated Types§
Required Methods§
Provided Methods§
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.