INNER CODE UNIT · Rust

intersects

pamburus/hl · crates/enumset-ext/src/lib.rs:8

    fn intersects(&self, other: Self) -> bool;
    fn includes(&self, other: Self) -> bool;
}

impl<T: EnumSetType> EnumSetExt<T> for EnumSet<T> {
    #[inline]
    fn intersects(&self, other: Self) -> bool {
        !self.intersection(other).is_empty()
    }

    #[inline]
    fn includes(&self, other: Self) -> bool {
        self.intersection(other) == other
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…