pub struct WindowSize {
pub rows: u16,
pub cols: u16,
pub width: u16,
pub height: u16,
}Expand description
Terminal window size information
Fields§
§rows: u16Number of rows (lines)
cols: u16Number of columns (characters)
width: u16Screen width in pixels
height: u16Screen height in pixels
Implementations§
Source§impl WindowSize
impl WindowSize
Sourcepub fn cell_width(&self) -> u16
pub fn cell_width(&self) -> u16
Get the cell width in pixels
Sourcepub fn cell_height(&self) -> u16
pub fn cell_height(&self) -> u16
Get the cell height in pixels
Trait Implementations§
Source§impl Clone for WindowSize
impl Clone for WindowSize
Source§fn clone(&self) -> WindowSize
fn clone(&self) -> WindowSize
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowSize
impl Debug for WindowSize
Source§impl PartialEq for WindowSize
impl PartialEq for WindowSize
impl Copy for WindowSize
impl Eq for WindowSize
impl StructuralPartialEq for WindowSize
Auto Trait Implementations§
impl Freeze for WindowSize
impl RefUnwindSafe for WindowSize
impl Send for WindowSize
impl Sync for WindowSize
impl Unpin for WindowSize
impl UnsafeUnpin for WindowSize
impl UnwindSafe for WindowSize
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