pub trait Write {
// Required methods
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>;
fn flush(&mut self) -> Result<(), Error>;
// Provided method
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error> { ... }
}
Expand description
A generic trait describing an output stream. See std::io::Write
for more info.