From eb310bd6f04daf97c8d2539d6f0379fb698295bc Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 27 Oct 2019 15:34:59 -0400 Subject: metadata --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..b12b1f1 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# tokio-terminal-resize + +Implements a stream of terminal resize events. + +## Overview + +Whenever the user resizes their terminal, a notification is sent to the +application running in it. This crate provides those notifications in the +form of a stream. + +## Synopsis + +```rust +let stream = tokio_terminal_resize::resizes().flatten_stream(); +let prog = stream + .for_each(|(rows, cols)| { + println!("terminal is now {}x{}", cols, rows); + Ok(()) + }) + .map_err(|e| eprintln!("error: {}", e)); +tokio::run(prog); +``` -- cgit v1.2.3-54-g00ecf