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

Number of lines in the terminal

Number of columns in the terminal

Methods

impl Size
[src]

[src]

Returns the total number of cells in a terminal of the given size.

Panics

If lines * columns would overflow.

[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]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Clone for Size
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Size
[src]

impl Debug for Size
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Size

impl Sync for Size