beamterm-data 1.0.0

Core data structures and binary serialization for the beamterm WebGL terminal renderer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Dimensions of a terminal grid in cells.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct TerminalSize {
    /// Column count.
    pub cols: u16,
    /// Row count.
    pub rows: u16,
}

impl TerminalSize {
    /// Creates a new terminal size with the given column and row counts.
    #[must_use]
    pub fn new(cols: u16, rows: u16) -> Self {
        Self { cols, rows }
    }
}