1use std::io::Result as IOResult; 2 3/// Decodes bytes into a chunk data. 4/// This can return errors for decoding fails by something cause. 5pub trait Decoder<T> { 6 fn decode(&mut self) -> IOResult<T>; 7}