hermit::io

Trait Write

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

    // Provided methods
    fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... }
    fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()> { ... }
}
Expand description

The Write trait allows for reading bytes from a source.

The Write trait is derived from Rust’s std library.

Required Methods§

Source

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

Provided Methods§

Source

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

Attempts to write an entire buffer into this writer.

Source

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()>

Writes a formatted string into this writer, returning any error encountered.

Implementors§