pub trait Decode {
    fn decode<I>(input: &mut I) -> Result<Self, Error>
    where
        I: Input
; fn skip<I>(input: &mut I) -> Result<(), Error>
    where
        I: Input
, { ... }
fn encoded_fixed_size() -> Option<usize> { ... } }
Expand description

Trait that allows zero-copy read of value-references from slices in LE format.

Required methods

Attempt to deserialise the value from input.

Provided methods

Attempt to skip the encoded value from input.

The default implementation of this function is just calling Decode::decode. When possible, an implementation should provided a specialized implementation.

Returns the fixed encoded size of the type.

If it returns Some(size) then all possible values of this type have the given size (in bytes) when encoded.

NOTE: A type with a fixed encoded size may return None.

Implementations on Foreign Types

impl Decode for Entry

Implementors