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