pub trait IoWrite {
    // Required methods
    fn write(&self, buf: &[u8]) -> Result<usize, WriteError>;
    fn flush(&self) -> Result<(), WriteError>;
}
Expand description

Trait for stdout/stderr

Required Methods§

source

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

Write data from buf, returning the number of bytes written.

source

fn flush(&self) -> Result<(), WriteError>

Flush any buffered internal data. This function is allowed to be a no-op.

Implementors§