aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-05 01:39:34 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-05 01:44:19 -0500
commitc8a23e4837441ecb02b0fe89143433b652192e7f (patch)
treeab708edd20635b1ef50e8318d2f15128a1f5972a /src/parser.rs
parentf7de5f52ff1ae465f09a648cffb81192b6aecf45 (diff)
downloadvt100-rust-c8a23e4837441ecb02b0fe89143433b652192e7f.tar.gz
vt100-rust-c8a23e4837441ecb02b0fe89143433b652192e7f.zip
docs
Diffstat (limited to 'src/parser.rs')
-rw-r--r--src/parser.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 2e27399..77373bd 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -1,3 +1,5 @@
+/// A parser for terminal output which produces an in-memory representation of
+/// the terminal contents.
pub struct Parser {
parser: vte::Parser,
screen: crate::screen::Screen,
@@ -23,10 +25,14 @@ impl Parser {
}
}
+ /// Returns a reference to a `Screen` object containing the terminal
+ /// state.
pub fn screen(&self) -> &crate::screen::Screen {
&self.screen
}
+ /// Returns a mutable reference to a `Screen` object containing the
+ /// terminal state.
pub fn screen_mut(&mut self) -> &mut crate::screen::Screen {
&mut self.screen
}