#proc-macro #user-input #macro

macro macron-input

Reads user input lines from the console

1 unstable release

0.1.1 May 25, 2025

#156 in #user-input


Used in macron

MIT license

6KB
61 lines

githubcrates-iodocs-rs

Read User Inputs

Introduction:

Reads user input lines from the console.

P.s.: More useful macros you can find here.

Examples:

let mut input = input!("Enter in order '0', '1', '2': ");

for i in 0..=2 {
    if let Ok(text) = input.next().unwrap() {
        assert_eq!(text, format!("{i}"));
    }
}

Licensing:

Distributed under the MIT license.

Feedback:

You can contact me via GitHub or send a message to my Telegram @fuderis.

This library is constantly evolving, and I welcome your suggestions and feedback.

Dependencies

~150–550KB
~13K SLoC