pub struct WindowSize { /* private fields */ }Expand description
Character-cell dimensions and optional pixel geometry for a terminal window.
Implementations§
Source§impl WindowSize
impl WindowSize
pub const fn new(cells: TerminalSize, pixels: Option<PixelSize>) -> Self
pub const fn cells(self) -> TerminalSize
Sourcepub const fn pixels(self) -> Option<PixelSize>
pub const fn pixels(self) -> Option<PixelSize>
Returns pixel geometry when the platform reports meaningful values.
Sourcepub const fn cell_pixels(self) -> Option<PixelSize>
pub const fn cell_pixels(self) -> Option<PixelSize>
Returns the pixel dimensions of one character cell when the reported window geometry divides into a uniform non-empty cell grid.
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 (const: unstable) · 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 Default for WindowSize
impl Default for WindowSize
Source§fn default() -> WindowSize
fn default() -> WindowSize
Returns the “default value” for a type. Read more
Source§impl Hash for WindowSize
impl Hash for WindowSize
Source§impl PartialEq for WindowSize
impl PartialEq for WindowSize
Source§fn eq(&self, other: &WindowSize) -> bool
fn eq(&self, other: &WindowSize) -> bool
Tests for
self and other values to be equal, and is used by ==.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