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.

Implementations on Foreign Types

Blanket Decode impl for slices of encodable types

Implementors