pub struct TerminalSize {
pub cols: u16,
pub rows: u16,
}Expand description
A terminal geometry request.
Fields§
§cols: u16The requested column count.
rows: u16The requested row count.
Implementations§
Source§impl TerminalSize
impl TerminalSize
Sourcepub const fn new(cols: u16, rows: u16) -> TerminalSize
pub const fn new(cols: u16, rows: u16) -> TerminalSize
Creates a terminal size value from column and row counts.
Sourcepub const fn into_geometry(self) -> TerminalGeometry
pub const fn into_geometry(self) -> TerminalGeometry
Returns this cell geometry wrapped as a terminal geometry with no pixel size.
Trait Implementations§
Source§impl Clone for TerminalSize
impl Clone for TerminalSize
Source§fn clone(&self) -> TerminalSize
fn clone(&self) -> TerminalSize
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 moreimpl Copy for TerminalSize
Source§impl Debug for TerminalSize
impl Debug for TerminalSize
Source§impl Default for TerminalSize
impl Default for TerminalSize
Source§fn default() -> TerminalSize
fn default() -> TerminalSize
Returns the “default value” for a type. Read more
impl Eq for TerminalSize
Source§impl Hash for TerminalSize
impl Hash for TerminalSize
Source§impl PartialEq for TerminalSize
impl PartialEq for TerminalSize
Source§fn eq(&self, other: &TerminalSize) -> bool
fn eq(&self, other: &TerminalSize) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TerminalSize
Auto Trait Implementations§
impl Freeze for TerminalSize
impl RefUnwindSafe for TerminalSize
impl Send for TerminalSize
impl Sync for TerminalSize
impl Unpin for TerminalSize
impl UnsafeUnpin for TerminalSize
impl UnwindSafe for TerminalSize
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