Struct linefeed::terminal::Size
[−]
[src]
pub struct Size { pub lines: usize, pub columns: usize, }
Represents the size of a terminal window
A valid size must not have zero lines or zero columns.
Fields
lines: usize
Number of lines in the terminal
columns: usize
Number of columns in the terminal
Methods
impl Size
[src]
pub fn area(&self) -> usize
[src]
Returns the total number of cells in a terminal of the given size.
Panics
If lines * columns
would overflow.
pub fn checked_area(&self) -> Option<usize>
[src]
Returns the total number of cells in a terminal of the given size.
Returns None
in case of overflow.
Trait Implementations
impl Copy for Size
[src]
impl PartialEq<Size> for Size
[src]
fn eq(&self, __arg_0: &Size) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Size) -> bool
[src]
This method tests for !=
.
impl Clone for Size
[src]
fn clone(&self) -> Size
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more