DataRecorder

Trait DataRecorder 

Source
pub trait DataRecorder {
    // Required method
    fn write(&mut self, buf: &[u8]) -> Result<usize, IoError>;

    // Provided method
    fn write_all(&mut self, buf: &[u8]) -> Result<(), IoError> { ... }
}

Required Methods§

Source

fn write(&mut self, buf: &[u8]) -> Result<usize, IoError>

Writes given buffer to recorder. Returns count of written bytes or 0 if end of the destination asset was reached (e.g. buffer filled)

Provided Methods§

Source

fn write_all(&mut self, buf: &[u8]) -> Result<(), IoError>

Writes all bytes to the destination or returns IoError::WriteZero if destination refused to accept more bytes

Implementors§