pub trait Decode<'a>: Sized {
    type Output: Debug;
    type Error: From<Error> + Debug;

    fn decode(buff: &'a [u8]) -> Result<(Self::Output, usize), Self::Error>;
}
Expand description

Decode trait implemented for binary decodable objects

Required Associated Types§

Output type (allows attaching lifetime bounds where required)

Error type returned on parse error

Required Methods§

Decode consumes a slice and returns an object and decoded length.

Implementors§

Blanket Decode impl for DecodeOwned types