pub trait SetLike<T> {
// Required methods
fn insert(&mut self, t: T) -> bool;
fn extend(&mut self, iter: impl Iterator<Item = T>);
fn contains(&self, t: &T) -> bool;
fn remove(&mut self, t: &T) -> bool;
}Expand description
A data-structure providing the storage of non-duplicated items and the querying of their inclusion.
Required Methods§
Sourcefn insert(&mut self, t: T) -> bool
fn insert(&mut self, t: T) -> bool
Insert item into the set.
Inserts some item t into the set.
Returns true iff the item was not already in 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.