Trait Writes
Source pub trait Writes {
// Required method
fn write(&mut self, buf: &[u8]) -> Result<usize, StreamError>;
// Provided method
fn write_all(&mut self, buf: &[u8]) -> Result<(), StreamError> { ... }
}
Expand description
A thing that writes to a stream of bytes.
Writes bytes from buf, returning the number
of bytes written.
No more than buf.len() bytes will be written.
If an error occurs, the number of bytes written
is undefined.
Writes all bytes from buf.
If an error occurs, the number of bytes written
is undefined.