pub trait Decodable: Sized {
type Error: Error;
type Cond;
fn decode_with<R: Read>(
reader: &mut R,
cond: Self::Cond
) -> Result<Self, Self::Error>;
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