pub trait Writer {
// Required methods
fn offset(&mut self) -> u64;
fn write(&mut self, data: &[u8], offset: u64);
fn append(&mut self, data: &[u8]);
fn append_string(&mut self, string: &str);
fn take(&mut self) -> Vec<u8> ⓘ;
fn slice(&mut self, start: u64, end: u64) -> Vec<u8> ⓘ;
fn flush(&mut self);
}Expand description
The defacto interface for all writers.
Required Methods§
Sourcefn append_string(&mut self, string: &str)
fn append_string(&mut self, string: &str)
Append string to the writer
Implementors§
impl Writer for BufferWriter
impl Writer for FileWriter
Available on crate feature
std only.