summaryrefslogtreecommitdiffstats
path: root/vendor/anes/examples/execute.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/anes/examples/execute.rs')
-rw-r--r--vendor/anes/examples/execute.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/anes/examples/execute.rs b/vendor/anes/examples/execute.rs
new file mode 100644
index 000000000..df781fc74
--- /dev/null
+++ b/vendor/anes/examples/execute.rs
@@ -0,0 +1,15 @@
+/// An example how to execute the ANSI escape sequence.
+use std::io::{Result, Write};
+
+use anes::execute;
+
+fn main() -> Result<()> {
+ let mut stdout = std::io::stdout();
+ execute!(
+ &mut stdout,
+ anes::SaveCursorPosition,
+ anes::MoveCursorTo(10, 10),
+ anes::RestoreCursorPosition
+ )?;
+ Ok(())
+}