pub struct WindowSize {
pub columns_rows: Size,
pub pixels: Size,
}
Expand description
The window size in characters (columns / rows) as well as pixels.
Fields§
§columns_rows: Size
Size of the window in characters (columns / rows).
pixels: Size
Size of the window in pixels.
The pixels
fields may not be implemented by all terminals and return 0,0
. See
https://man7.org/linux/man-pages/man4/tty_ioctl.4.html under section “Get and set window
size” / TIOCGWINSZ where the fields are commented as “unused”.
Trait Implementations§
Source§impl Clone for WindowSize
impl Clone for WindowSize
Source§fn clone(&self) -> WindowSize
fn clone(&self) -> WindowSize
Returns a copy 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 Hash for WindowSize
impl Hash 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more