minicrossterm/examples/Crossterm 0.3.0/bin.rs

33 lines
648 B
Rust
Raw Normal View History

//! This bin folder can be used to try the examples out located in the examples directory.
//!
//! All you need to do is:
2018-07-02 06:43:43 +10:00
//!
//! - Download the crossterm source code.
//! - Add this in the Cargo.toml file:
//! ``` [[bin]]
//! name = "example_bin"
//! path = "./examples/bin.rs"
//! ```
//!
//! - Run program with: `cargo run`
2018-07-19 23:11:36 +10:00
extern crate crossterm;
use crossterm::Context;
2018-07-19 06:32:17 +10:00
// mod terminal;
// mod color;
// mod cursor;
// mod crossterm_type;
2018-07-19 06:32:17 +10:00
fn main()
{
2018-07-19 23:11:36 +10:00
let context = Context::new();
let input = ::crossterm::input::input(&context);
let line = input.read_line().unwrap();
println!("input: {}",line);
2018-07-02 06:43:43 +10:00
}
2018-07-19 06:32:17 +10:00