pub trait BitsetStatic: BitsetDyn {
// Required methods
fn empty() -> Self;
fn with_bit(self, bit: usize) -> Self;
fn with_bits(self, bits: &[usize]) -> Self;
fn without_bit(self, bit: usize) -> Self;
fn without_bits(self, bits: &[usize]) -> Self;
fn intersection_top(&self, other: &Self) -> Option<usize>;
fn intersects(&self, other: &Self) -> bool;
fn union_inplace(&mut self, other: &Self);
fn intersect_inplace(&mut self, other: &Self);
fn bits(&self) -> impl Iterator<Item = usize>;
}Expand description
Subset of bitset ops that do not support dynamic dispatch.
Required Methods§
Sourcefn with_bit(self, bit: usize) -> Self
fn with_bit(self, bit: usize) -> Self
Return a copy of this bitset with bit set.
§Panics
If bit > Self::n_bits. The implementation is not permitted to panic if
n_bits returns None.
Sourcefn with_bits(self, bits: &[usize]) -> Self
fn with_bits(self, bits: &[usize]) -> Self
Return a copy of this bitset with bits set.
§Panics
If bit > Self::n_bits. The implementation is not permitted to panic if
n_bits returns None.
Sourcefn without_bit(self, bit: usize) -> Self
fn without_bit(self, bit: usize) -> Self
Return a copy of this bitset with bit cleared.
§Panics
If bit > Self::n_bits. The implementation is not permitted to panic if
n_bits returns None.
Sourcefn without_bits(self, bits: &[usize]) -> Self
fn without_bits(self, bits: &[usize]) -> Self
Return a copy of this bitset with bits set.
§Panics
If bit > Self::n_bits. The implementation is not permitted to panic if
n_bits returns None.
Sourcefn intersection_top(&self, other: &Self) -> Option<usize>
fn intersection_top(&self, other: &Self) -> Option<usize>
Get the intersection of this bitset with another and return the topmost shared bit.
Sourcefn intersects(&self, other: &Self) -> bool
fn intersects(&self, other: &Self) -> bool
Report whether this bitset intersects other.
Sourcefn union_inplace(&mut self, other: &Self)
fn union_inplace(&mut self, other: &Self)
Union other’s bits by mutating this value in-place.
Sourcefn intersect_inplace(&mut self, other: &Self)
fn intersect_inplace(&mut self, other: &Self)
Intersect other’s bits by mutating this value in-place.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".