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<()> { ... }
}
Expand description
A trait for objects which are byte-oriented sinks.