1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Visibility {
    Private,
    Public,
}

impl Visibility {
    pub fn is_public(&self) -> bool {
        matches!(self, &Visibility::Public)
    }
    pub fn is_private(&self) -> bool {
        !self.is_public()
    }
}