b717d306c3
When you want to work with the 'alternate screen' you can call the following functions: terminal::from_screen etc. Which will give you an instance to the back of the module you are calling it in. So instead of: let color = color(Screen::default()); let cursor = cursor(Screen::default()); let input = input(Screen::default()); let terminal = terminal(Screen::default()); You can do: let color = color(); let cursor = cursor(); let input = input(); let terminal = terminal();
21 lines
359 B
Rust
21 lines
359 B
Rust
|
|
//! This bin folder can be used to try the examples out located in the examples directory.
|
|
//!
|
|
//! All you need to do is:
|
|
//!
|
|
//! - Download the crossterm source code.
|
|
//! - Run program with: `cargo run --example examples`
|
|
|
|
extern crate crossterm;
|
|
|
|
// modules that could be test
|
|
mod terminal;
|
|
mod color;
|
|
mod cursor;
|
|
mod some_types;
|
|
mod input;
|
|
|
|
fn main()
|
|
{
|
|
}
|