Crate riostream

source ·
Expand description

A humorous attempt at implementing C++’s iostream and its syntax in Rust.

Differences from c++:

  • rin reads lines instead.
  • endl and flush consumes the stream object to avoid an ‘unused operator result’ lint from rust.

Disclaimer: this is purely for fun, do not use this crate in production.

Structs

  • prints '\n' and flushes when passed to rout or rerr
  • Flushes when passed to rout or rerr.
  • Emulates the behavior of cerr.
  • Emulates the behavior of cin.
  • Emulates the behavior of cout.