pub trait IndexSet {
// Required methods
fn len(&self) -> usize;
fn is_empty(&self) -> bool;
fn insert(&mut self, index: usize);
fn remove(&mut self, index: usize);
fn contains(&self, index: usize) -> bool;
fn iter(&self) -> impl Iterator<Item = usize> + '_;
fn union(&mut self, other: &Self);
// Provided method
fn reserve(&mut self, _size: usize) { ... }
}Expand description
Public interface of any index set implementation.
Required Methods§
Provided Methods§
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.