Skip to main content

urushi_terminal/
terminal.rs

1//! Geometry shared by terminal commands, events, and queries.
2
3#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
4pub struct Position {
5    column: usize,
6    row: usize,
7}
8
9impl Position {
10    pub const fn new(column: usize, row: usize) -> Self {
11        Self { column, row }
12    }
13
14    pub const fn column(self) -> usize {
15        self.column
16    }
17
18    pub const fn row(self) -> usize {
19        self.row
20    }
21}