Crate io_streams

source ·
Expand description

Unbuffered and unlocked I/O streams.

For a starting point, see StreamReader and StreamWriter for input and output streams. There’s also StreamDuplexer for interactive streams.

Since these types are unbuffered, it’s advisable for most use cases to wrap them in buffering types such as std::io::BufReader, std::io::BufWriter, std::io::LineWriter, BufDuplexer, or BufReaderLineWriter.


  • Wraps a reader and writer and buffers their output.
  • Wraps a reader and writer and buffers input and output to and from it, flushing the writer whenever a newline (0x0a, '\n') is detected on output.
  • An error returned by BufWriter::into_inner which combines an error that happened while writing out the buffer, and the buffered writer object which may be used to recover from the condition.
  • An unbuffered and unlocked interactive combination input and output stream, implementing Read and Write.
  • An unbuffered and unlocked input byte stream, implementing Read, abstracted over the source of the input.
  • An unbuffered and unlocked output byte stream, implementing Write, abstracted over the destination of the output.