[−][src]Crate anes
ANSI Escape Sequence
Every sequence implements the standard library Display
trait. It means that you can use macros like format!, write! to work with them.
Examples
Retrieve the sequence as a String:
use anes::cursor::SavePosition; let string = format!("{}", SavePosition); assert_eq!(&string, "\x1B7");
Use the sequence on the standard output:
use std::io::{Result, Write}; use anes::cursor; fn main() -> Result<()> { let mut stdout = std::io::stdout(); write!(stdout, "{}", cursor::SavePosition)?; write!(stdout, "{}", cursor::RestorePosition)?; stdout.flush()?; Ok(()) }
Modules
| cursor | TODO - top/left is 0,0 |
Macros
| csi | Creates a control sequence. |
| esc | Creates an escape sequence. |