aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 2c5aafb..2e21f01 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -278,6 +278,15 @@ impl<R: tokio::io::AsyncRead + 'static> Process<R> {
pub fn resize(&mut self, rows: u16, cols: u16) {
self.needs_resize = Some((rows, cols));
}
+
+ /// Returns a mutable reference to the input object provided in the
+ /// constructor.
+ ///
+ /// This can be useful if you are driving the input manually, rather than
+ /// just hooking it up directly to stdin.
+ pub fn input(&mut self) -> &mut R {
+ &mut self.input
+ }
}
impl<R: tokio::io::AsyncRead + 'static> Process<R> {