use std::io::Result; pub use byteorder::{ReadBytesExt, WriteBytesExt}; pub type Reader<'a> = &'a [u8]; pub type Writer = Vec; pub trait Io : Sized { fn read(r: &mut Reader) -> Result; fn write(&self, w: &mut Writer) -> Result<()>; }