use super::RedactionReason;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub struct RedactionReasons(
u64,
);
impl RedactionReasons {
#[must_use]
#[inline(always)]
pub const fn empty() -> Self {
Self(0)
}
#[must_use]
#[inline(always)]
pub const fn contains(self, reason: RedactionReason) -> bool {
self.0 & reason.bit() != 0
}
#[must_use]
#[inline(always)]
pub const fn with(self, reason: RedactionReason) -> Self {
Self(self.0 | reason.bit())
}
#[must_use]
#[inline(always)]
pub const fn union(self, other: Self) -> Self {
Self(self.0 | other.0)
}
}