pub trait Write: Io {
    fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>;
    fn flush(&mut self) -> Result<(), Self::Error>;

    fn write_all(&mut self, buf: &[u8]) -> Result<(), Self::Error> { ... }
    fn write_fmt(
        &mut self,
        fmt: Arguments<'_>
    ) -> Result<(), WriteFmtError<Self::Error>> { ... } }
Expand description

Blocking writer.

Semantics are the same as std::io::Write, check its documentation for details.

Required Methods

Write a buffer into this writer, returning how many bytes were written.

Flush this output stream, ensuring that all intermediately buffered contents reach their destination.

Provided Methods

Write an entire buffer into this writer.

Write a formatted string into this writer, returning any error encountered.

Implementors