tiling: Allow direction to be reversed

This commit is contained in:
Victoria Brekenfeld 2023-06-12 17:25:54 +02:00
parent 5dda8cfef5
commit be95fb9070

View file

@ -95,6 +95,18 @@ pub enum Direction {
Down,
}
impl std::ops::Not for Direction {
type Output = Self;
fn not(self) -> Self::Output {
match self {
Direction::Left => Direction::Right,
Direction::Right => Direction::Left,
Direction::Up => Direction::Down,
Direction::Down => Direction::Up,
}
}
}
#[derive(Debug, Clone, PartialEq)]
pub enum FocusResult {
None,