Struct mdcat::TerminalSize [−][src]
The size of a text terminal.
Fields
width: usize
The width of the terminal, in characters aka columns.
height: usize
The height of the terminal, in lines.
Methods
impl Size
[src]
impl Size
pub fn from_env() -> Option<Size>
[src]
pub fn from_env() -> Option<Size>
Get terminal size from $COLUMNS
and $LINES
.
pub fn detect() -> Option<Size>
[src]
pub fn detect() -> Option<Size>
Detect the terminal size.
Get the terminal size from the underlying TTY, and fallback to
$COLUMNS
and $LINES
.
Trait Implementations
impl Debug for Size
[src]
impl Debug for Size
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for Size
[src]
impl Copy for Size
impl Clone for Size
[src]
impl Clone for Size
fn clone(&self) -> Size
[src]
fn clone(&self) -> Size
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Default for Size
[src]
impl Default for Size
Auto Trait Implementations
impl Send for TerminalSize
impl Send for TerminalSize
impl Sync for TerminalSize
impl Sync for TerminalSize