Trait Write
Source pub trait Write {
// Required methods
fn write(&mut self, buf: &[u8]) -> Result<usize>;
fn flush(&mut self) -> Result<()>;
// Provided method
fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... }
}
Expand description
A generic trait describing an output stream.
See std::io::Write for more information.
Writes buf into this writer, returning how many bytes were written.
§Errors
If an I/O error occurs while writing to the underlying writer.
Flushes this output stream, ensuring that all intermediately buffered contents
reach their destination.
§Errors
If an I/O error occurs while flushing the underlying writer.
Attempts to write an entire buffer into this writer.
§Errors
If an I/O error occurs while writing to the underlying writer.
Source§Available on crate feature alloc only.