pub struct PtySize {
pub rows: u16,
pub cols: u16,
pub pixel_width: u16,
pub pixel_height: u16,
}Expand description
Window size of a pseudoterminal, in character cells plus optional pixels.
A child process attached to a PTY reads this through TIOCGWINSZ to lay out its output (wrapping, progress bars, table widths).
Mirroring the size of the controlling terminal keeps rendered output identical to running the command directly.
Fields§
§rows: u16Number of visible rows (character cells).
cols: u16Number of visible columns (character cells).
pixel_width: u16Pixel width of the terminal, 0 when unknown.
pixel_height: u16Pixel height of the terminal, 0 when unknown.
Implementations§
Trait Implementations§
impl Copy for PtySize
impl Eq for PtySize
impl StructuralPartialEq for PtySize
Auto Trait Implementations§
impl Freeze for PtySize
impl RefUnwindSafe for PtySize
impl Send for PtySize
impl Sync for PtySize
impl Unpin for PtySize
impl UnsafeUnpin for PtySize
impl UnwindSafe for PtySize
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more