macro_rules! make_io {
    () => { ... };
    ($read:expr, $write:expr) => { ... };
}
Expand description

Quickly makes an Io struct

Arguments (optional)

  • $read: must implement Read.
  • $write: must implement Write.

Example

use cambridge_asm::make_io;

let default_io = make_io!(); // no macro arguments will give the default I/O provider, i.e. stdio
let io = make_io!(std::io::stdin(), std::io::sink()); // you can use your own providers too