pub trait BitCollection {
Show 13 methods
// Required methods
fn new(init: BitsetInit) -> Self;
fn count(&self) -> usize;
fn test(&self, index: usize) -> bool;
fn set(&mut self, index: usize);
fn unset(&mut self, index: usize);
fn is_empty(&self) -> bool;
fn clear(&mut self);
fn capacity(&self) -> usize;
fn resize(&mut self, capacity: usize);
fn intersect_with(&mut self, other: &Bitset);
fn union_with(&mut self, other: &Bitset);
fn count_intersect_with(&self, other: &Bitset) -> usize;
fn count_interest_with_many(&self, others: &[Bitset]) -> Vec<usize>;
}Expand description
Operations on a bitset.
Required Methods§
Sourcefn new(init: BitsetInit) -> Self
fn new(init: BitsetInit) -> Self
A bitset of the given capacity and content.
Sourcefn intersect_with(&mut self, other: &Bitset)
fn intersect_with(&mut self, other: &Bitset)
Keeps only the elements also in other.
Sourcefn union_with(&mut self, other: &Bitset)
fn union_with(&mut self, other: &Bitset)
Adds the elements of other.
Sourcefn count_intersect_with(&self, other: &Bitset) -> usize
fn count_intersect_with(&self, other: &Bitset) -> usize
Size of the intersection with other.
Sourcefn count_interest_with_many(&self, others: &[Bitset]) -> Vec<usize>
fn count_interest_with_many(&self, others: &[Bitset]) -> Vec<usize>
Size of the intersection with each of others.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".