ratatui-toolkit 0.2.6

DEPRECATED: this crate was renamed to `ratkit`. Please migrate to `ratkit`.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Terminal size representation

/// Terminal dimensions
#[derive(Clone, Copy, Eq, PartialEq, Debug, Default)]
pub struct Size {
    /// Number of columns (width)
    pub cols: u16,
    /// Number of rows (height)
    pub rows: u16,
}

impl Size {
    /// Create a new size
    pub fn new(cols: u16, rows: u16) -> Self {
        Self { cols, rows }
    }
}