pub trait SmallSet<T>:
Copy
+ Eq
+ BitAnd
+ BitOr
+ BitXor
+ Not
+ Sub {
const EMPTY: Self;
const ALL: Self;
Show 13 methods
// Required methods
fn len(self) -> usize;
fn contains(self, value: T) -> bool;
fn insert(&mut self, value: T) -> bool;
fn remove(&mut self, value: T) -> bool;
fn toggle(&mut self, value: T) -> bool;
fn iter(self) -> impl Iterator<Item = T>;
// Provided methods
fn is_empty(self) -> bool { ... }
fn set(&mut self, value: T, condition: bool) { ... }
fn intersection(self, rhs: Self) -> <Self as BitAnd>::Output { ... }
fn union(self, rhs: Self) -> <Self as BitOr>::Output { ... }
fn difference(self, rhs: Self) -> <Self as Sub>::Output { ... }
fn symmetric_difference(self, rhs: Self) -> <Self as BitXor>::Output { ... }
fn complement(self) -> <Self as Not>::Output { ... }
}Expand description
A bitset whose size is known at compile time
Required Associated Constants§
Required Methods§
Provided Methods§
Sourcefn intersection(self, rhs: Self) -> <Self as BitAnd>::Output
fn intersection(self, rhs: Self) -> <Self as BitAnd>::Output
Intersection of two sets
Sourcefn difference(self, rhs: Self) -> <Self as Sub>::Output
fn difference(self, rhs: Self) -> <Self as Sub>::Output
Difference of two sets
Sourcefn symmetric_difference(self, rhs: Self) -> <Self as BitXor>::Output
fn symmetric_difference(self, rhs: Self) -> <Self as BitXor>::Output
Symmetric difference of two sets
Sourcefn complement(self) -> <Self as Not>::Output
fn complement(self) -> <Self as Not>::Output
Complement of the set
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.