pub struct TerminalGeometry {
pub size: TerminalSize,
pub pixels: Option<TerminalPixels>,
}Expand description
A terminal geometry request including cell dimensions and optional pixels.
Fields§
§size: TerminalSizeThe terminal size in character cells.
pixels: Option<TerminalPixels>The terminal size in pixels, when the outer terminal exposes it.
Implementations§
Source§impl TerminalGeometry
impl TerminalGeometry
Sourcepub const fn new(cols: u16, rows: u16) -> TerminalGeometry
pub const fn new(cols: u16, rows: u16) -> TerminalGeometry
Creates terminal geometry from cell dimensions.
Sourcepub const fn from_size(size: TerminalSize) -> TerminalGeometry
pub const fn from_size(size: TerminalSize) -> TerminalGeometry
Creates terminal geometry from an existing cell size.
Sourcepub const fn with_pixels(self, pixels: TerminalPixels) -> TerminalGeometry
pub const fn with_pixels(self, pixels: TerminalPixels) -> TerminalGeometry
Adds pixel dimensions to this geometry.
Trait Implementations§
Source§impl Clone for TerminalGeometry
impl Clone for TerminalGeometry
Source§fn clone(&self) -> TerminalGeometry
fn clone(&self) -> TerminalGeometry
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 TerminalGeometry
Source§impl Debug for TerminalGeometry
impl Debug for TerminalGeometry
Source§impl Default for TerminalGeometry
impl Default for TerminalGeometry
Source§fn default() -> TerminalGeometry
fn default() -> TerminalGeometry
Returns the “default value” for a type. Read more
impl Eq for TerminalGeometry
Source§impl Hash for TerminalGeometry
impl Hash for TerminalGeometry
Source§impl PartialEq for TerminalGeometry
impl PartialEq for TerminalGeometry
Source§fn eq(&self, other: &TerminalGeometry) -> bool
fn eq(&self, other: &TerminalGeometry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TerminalGeometry
Auto Trait Implementations§
impl Freeze for TerminalGeometry
impl RefUnwindSafe for TerminalGeometry
impl Send for TerminalGeometry
impl Sync for TerminalGeometry
impl Unpin for TerminalGeometry
impl UnsafeUnpin for TerminalGeometry
impl UnwindSafe for TerminalGeometry
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