Skip to main content

DuplicateInsertsLastWinsSet

Trait DuplicateInsertsLastWinsSet 

Source
pub trait DuplicateInsertsLastWinsSet<T> {
    // Required methods
    fn new(size_hint: Option<usize>) -> Self;
    fn replace(&mut self, value: T);
}

Required Methods§

Source

fn new(size_hint: Option<usize>) -> Self

Source

fn replace(&mut self, value: T)

Insert or replace the existing value

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.

Implementors§

Source§

impl<T> DuplicateInsertsLastWinsSet<T> for BTreeSet<T>
where T: Ord,

Source§

impl<T, S> DuplicateInsertsLastWinsSet<T> for HashSet<T, S>
where T: Eq + Hash, S: BuildHasher + Default,

Available on crate feature std only.