beamterm_data/terminal_size.rs
1/// Dimensions of a terminal grid in cells.
2#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3pub struct TerminalSize {
4 /// Column count.
5 pub cols: u16,
6 /// Row count.
7 pub rows: u16,
8}
9
10impl TerminalSize {
11 /// Creates a new terminal size with the given column and row counts.
12 #[must_use]
13 pub fn new(cols: u16, rows: u16) -> Self {
14 Self { cols, rows }
15 }
16}