aboutsummaryrefslogtreecommitdiffstats
path: root/src/pty.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-03-06 02:34:09 -0500
committerJesse Luehrs <doy@tozt.net>2021-03-06 02:34:09 -0500
commit3c94117b577667b6c34a23529a0aa18ac354404b (patch)
tree1fed6f1d3a6219117369045e2af4bfd2c8fd18c7 /src/pty.rs
parent0f20c79767ea711931b29525905bf90b1cd4f556 (diff)
downloadpty-process-3c94117b577667b6c34a23529a0aa18ac354404b.tar.gz
pty-process-3c94117b577667b6c34a23529a0aa18ac354404b.zip
docs
Diffstat (limited to 'src/pty.rs')
-rw-r--r--src/pty.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pty.rs b/src/pty.rs
index 03a6217..bf34d61 100644
--- a/src/pty.rs
+++ b/src/pty.rs
@@ -21,6 +21,7 @@ pub trait Pty {
fn resize(&self, size: &super::Size) -> Result<()>;
}
+/// Represents the size of the pty.
pub struct Size {
row: u16,
col: u16,
@@ -29,6 +30,8 @@ pub struct Size {
}
impl Size {
+ /// Returns a [`Size`](Size) instance with the given number of rows and
+ /// columns.
pub fn new(row: u16, col: u16) -> Self {
Self {
row,
@@ -38,6 +41,8 @@ impl Size {
}
}
+ /// Returns a [`Size`](Size) instance with the given number of rows and
+ /// columns, as well as the given pixel dimensions.
pub fn new_with_pixel(
row: u16,
col: u16,