[][src]Struct mdcat::TerminalSize

pub struct TerminalSize {
    pub width: usize,
    pub height: usize,
}

The size of a text terminal, in characters and lines.

Fields

width: usize

The width of the terminal, in characters aka columns.

height: usize

The height of the terminal, in lines.

Implementations

impl Size[src]

pub fn from_env() -> Option<Size>[src]

Get terminal size from $COLUMNS and $LINES.

pub fn detect() -> Option<Size>[src]

Detect the terminal size.

Get the terminal size from the underlying TTY, and fallback to $COLUMNS and $LINES.

Trait Implementations

impl Clone for Size[src]

impl Copy for Size[src]

impl Debug for Size[src]

impl Default for Size[src]

fn default() -> Size[src]

A good default size assumption for a terminal: 80x24.

Auto Trait Implementations

impl RefUnwindSafe for Size

impl Send for Size

impl Sync for Size

impl Unpin for Size

impl UnwindSafe for Size

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.