pub trait Write {
// Required methods
fn write(&mut self, buf: &[u8]) -> Result<usize>;
fn flush(&mut self) -> Result<()>;
// Provided methods
fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... }
fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()> { ... }
fn by_ref(&mut self) -> &mut Self
where Self: Sized { ... }
}
Tries to write the contents of the provided buffer into this writer
returning how many bytes were written.
Writer
failing to write
Flushes this Writer
Formatting the provided arguments, or the Writer
failing to write
Writes the full buffer into this Writer
Writer
failing to write
Writes format arguments into this Writer
Formatting the provided arguments, or the Writer
failing to write
Get this Writer
as a mutable reference