use super::Intents;
impl std::ops::BitOr for Intents {
type Output = Self;
fn bitor(self, rhs: Self) -> Self::Output {
Self {
bits: self.bits | rhs.bits,
}
}
}
impl std::ops::BitOrAssign for Intents {
fn bitor_assign(&mut self, rhs: Self) {
self.bits |= rhs.bits;
}
}
impl std::ops::BitAnd for Intents {
type Output = Self;
fn bitand(self, rhs: Self) -> Self::Output {
Self {
bits: self.bits & rhs.bits,
}
}
}
impl std::ops::BitAndAssign for Intents {
fn bitand_assign(&mut self, rhs: Self) {
self.bits &= rhs.bits;
}
}
impl std::ops::BitXor for Intents {
type Output = Self;
fn bitxor(self, rhs: Self) -> Self::Output {
Self {
bits: self.bits ^ rhs.bits,
}
}
}
impl std::ops::BitXorAssign for Intents {
fn bitxor_assign(&mut self, rhs: Self) {
self.bits ^= rhs.bits;
}
}
impl std::ops::Not for Intents {
type Output = Self;
fn not(self) -> Self::Output {
Self { bits: !self.bits }
}
}