pub trait AsImHashSet<A: Hash + Eq + Clone>: Clone {
// Required methods
fn insert(&mut self, a: A) -> Option<A>;
fn remove<BA>(&mut self, a: &BA) -> Option<A>
where BA: Hash + Eq + ?Sized,
A: Borrow<BA>;
fn retain<F: FnMut(&A) -> bool>(&mut self, f: F);
// Provided methods
fn to_inserted(&mut self, a: A) -> (Self, Option<A>) { ... }
fn to_removed<BA>(&self, a: &BA) -> (Self, Option<A>)
where BA: Hash + Eq + ?Sized,
A: Borrow<BA> { ... }
fn to_retained<F: FnMut(&A) -> bool>(&self, f: F) -> Self { ... }
fn to_extended<I: IntoIterator<Item = A>>(&self, iter: I) -> Self
where Self: Extend<A> { ... }
fn iter_clone(&self) -> Self::IntoIter
where Self: IntoIterator { ... }
}
Required Methods§
fn insert(&mut self, a: A) -> Option<A>
fn remove<BA>(&mut self, a: &BA) -> Option<A>
fn retain<F: FnMut(&A) -> bool>(&mut self, f: F)
Provided Methods§
fn to_inserted(&mut self, a: A) -> (Self, Option<A>)
fn to_removed<BA>(&self, a: &BA) -> (Self, Option<A>)
fn to_retained<F: FnMut(&A) -> bool>(&self, f: F) -> Self
fn to_extended<I: IntoIterator<Item = A>>(&self, iter: I) -> Selfwhere
Self: Extend<A>,
fn iter_clone(&self) -> Self::IntoIterwhere
Self: IntoIterator,
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.