pub trait KeySet: Default {
type Iter<'a>: Iterator<Item = Key>
where Self: 'a;
// Required methods
fn insert(&mut self, key: Key);
fn remove(&mut self, key: &Key);
fn contains(&self, key: &Key) -> bool;
fn iter(&self) -> Self::Iter<'_>;
fn is_empty(&self) -> bool;
fn count(&self) -> usize;
}Required Associated Types§
Required Methods§
fn insert(&mut self, key: Key)
fn remove(&mut self, key: &Key)
fn contains(&self, key: &Key) -> bool
fn iter(&self) -> Self::Iter<'_>
fn is_empty(&self) -> bool
fn count(&self) -> usize
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.
Implementations on Foreign Types§
Source§impl KeySet for RoaringTreemap
Available on crate feature roaring only.
impl KeySet for RoaringTreemap
Available on crate feature
roaring only.Source§impl<S: BuildHasher + Default> KeySet for HashSet<Key, S>
Available on crate feature std only.
impl<S: BuildHasher + Default> KeySet for HashSet<Key, S>
Available on crate feature
std only.