aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/term.rs')
-rw-r--r--src/term.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/term.rs b/src/term.rs
index 1e69d07..c988702 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -344,3 +344,23 @@ impl BufWrite for MoveFromTo {
}
}
}
+
+#[derive(Default, Debug)]
+#[must_use = "this struct does nothing unless you call write_buf"]
+pub struct AudibleBell;
+
+impl BufWrite for AudibleBell {
+ fn write_buf(&self, buf: &mut Vec<u8>) {
+ buf.push(b'\x07');
+ }
+}
+
+#[derive(Default, Debug)]
+#[must_use = "this struct does nothing unless you call write_buf"]
+pub struct VisualBell;
+
+impl BufWrite for VisualBell {
+ fn write_buf(&self, buf: &mut Vec<u8>) {
+ buf.extend_from_slice(b"\x1bg");
+ }
+}