terminal-utils
This crate provides utilities for working with terminals.
Terminal size
let size = size.unwrap;
println!;
Raw mode
let raw_mode_guard = enable_raw_mode.unwrap;
println!;
let is_raw_mode_enabled = is_raw_mode_enabled.unwrap;
assert!;
// Previous terminal mode is restored when the guard is dropped.
drop;
println!;
Resize signal
This feature is only available with the tokio
feature. It is enabled by default.
let mut resize_rx = on_resize.unwrap;
spawn;