Decoder

Trait Decoder 

Source
pub trait Decoder<Item> {
    type Error: From<Error>;

    // Required method
    fn decode(&mut self, buf: &[u8]) -> Result<Item, Self::Error>;
}
Expand description

Trait for decoding byte sequences back into structured items.

Required Associated Types§

Source

type Error: From<Error>

Errors happened during the decoding process

Required Methods§

Source

fn decode(&mut self, buf: &[u8]) -> Result<Item, Self::Error>

Decodes a byte sequence into an item.

Implementors§