spacegate_kernel/extension/
is_east_west_traffic.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::ops::Deref;

#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
pub struct IsEastWestTraffic(bool);

impl IsEastWestTraffic {
    pub fn new(is_east_west: bool) -> Self {
        Self(is_east_west)
    }
}

impl Deref for IsEastWestTraffic {
    type Target = bool;

    fn deref(&self) -> &Self::Target {
        &self.0
    }
}