Function glommio::io::stdin[][src]

pub fn stdin() -> Stdin
Expand description

Allows asynchronous read access to the standard input

Examples

use futures_lite::AsyncBufReadExt;
use glommio::{io::stdin, LocalExecutor};

let ex = LocalExecutor::default();
ex.run(async {
    let mut sin = stdin();
    loop {
        let mut buf = String::new();
        sin.read_line(&mut buf).await.unwrap();
        println!("you just typed {}", buf);
    }
});