pub trait Decode<C: Codec>: Sized {
    fn decode<R: Read + Seek>(c: C, r: &mut R) -> Result<Self>;
}
Expand description

Decode trait.

This trait is generic over a codec, so that different codecs can be implemented for the same type.

Required Methods§

Decode from an impl Read.

It takes a specific codec as parameter, so that the Decode can be generic over an enum that contains multiple codecs.

Implementations on Foreign Types§

Implementors§