[][src]Macro prcn_lib::prelude::input

macro_rules! input {
     => { ... };
     => { ... };
     => { ... };
     => { ... };
     => { ... };
     => { ... };
     => { ... };
     => { ... };
     => { ... };
}

read input from stdin.

basic syntax is:

input! {
    from source,          // optional: if you omitted, stdin is used by default.
    (mut) variable: type, // mut is optional: mut makes the variable mutable.
    ...
}

the trailing comma is optional. source can be anything implementing Source. This macro moves out the specified source. If you want to prevent moving, you can use &mut source since &mut S where S: Source also implements Source.