pub trait Archive {
fn is_reader(&self) -> bool;
fn write_all(&mut self, buf: &[u8]) -> Result<()>;
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>;
}
Expand description
An archive reader or writer trait
There is a single trait in order to simplify Archivable
impls.
Required Methods
Write all requested bytes in buf
or return an error
sourcefn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
Read exactly the requested bytes into buf
or return an error