#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Places(u8);
impl Places {
pub const ROW: Self = Self(1);
pub const DETAIL: Self = Self(1 << 1);
pub const EDIT: Self = Self(1 << 2);
pub const BULK: Self = Self(1 << 3);
pub const RECORD: Self = Self(Self::ROW.0 | Self::DETAIL.0 | Self::EDIT.0);
pub const ALL: Self = Self(Self::RECORD.0 | Self::BULK.0);
#[must_use]
pub const fn with(self, other: Self) -> Self {
Self(self.0 | other.0)
}
#[must_use]
pub const fn contains(self, other: Self) -> bool {
self.0 & other.0 == other.0
}
#[must_use]
pub const fn intersects(self, other: Self) -> bool {
self.0 & other.0 != 0
}
}