pub trait Write {
// Required methods
fn write(&mut self, buf: &[u8]) -> Result<usize, AxError>;
fn flush(&mut self) -> Result<(), AxError>;
// Provided methods
fn write_all(&mut self, buf: &[u8]) -> Result<(), AxError> { ... }
fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), AxError> { ... }
fn by_ref(&mut self) -> &mut Self
where Self: Sized { ... }
}Expand description
A trait for objects which are byte-oriented sinks.
See [std::io::Write] for more details.
Required Methods§
Provided Methods§
Sourcefn write_all(&mut self, buf: &[u8]) -> Result<(), AxError>
fn write_all(&mut self, buf: &[u8]) -> Result<(), AxError>
Attempts to write an entire buffer into this writer.