scanio
RFC: https://github.com/rust-lang/rfcs/pull/3183
This crate is the testing/WIP implementation of some simple macros for generic text input scanning (to accompany the print
family of macros).
This crate currently implements four macros, scan!
, try_scan!
, read!
and try_read!
.
The implementation for these macros is experimental.
scan!
usage:
extern crate scanio;
try_scan!
usage:
extern crate scanio;
The read!
and try_read!
macros work exactly the same, however their first argument must be a mutable reference to an object that implements the std::io::Read
trait, such as std::io::stdin()
or a File
.