use super::SlotSet;
impl SlotSet {
pub fn union(&self, other: &Self) -> Self {
Self(&self.0 | &other.0)
}
pub fn intersection(&self, other: &Self) -> Self {
Self(&self.0 & &other.0)
}
#[allow(
clippy::arithmetic_side_effects,
reason = "Roaring subtraction is infallible set difference, not numeric arithmetic"
)]
pub fn excluding(&self, other: &Self) -> Self {
Self(&self.0 - &other.0)
}
pub fn union_excluding_overlap(&self, other: &Self) -> Self {
Self(&self.0 ^ &other.0)
}
pub fn is_disjoint(&self, other: &Self) -> bool {
self.0.is_disjoint(&other.0)
}
pub fn is_subset(&self, other: &Self) -> bool {
self.0.is_subset(&other.0)
}
}