jam_types::vec_set

Trait SetLike

Source
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;
}

Required Methods§

Source

fn insert(&mut self, t: T) -> bool

Source

fn extend(&mut self, iter: impl Iterator<Item = T>)

Source

fn contains(&self, t: &T) -> bool

Source

fn remove(&mut self, t: &T) -> bool

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<T: Eq + PartialEq + Ord + PartialOrd> SetLike<T> for BTreeSet<T>

Source§

fn insert(&mut self, t: T) -> bool

Source§

fn extend(&mut self, iter: impl Iterator<Item = T>)

Source§

fn contains(&self, t: &T) -> bool

Source§

fn remove(&mut self, t: &T) -> bool

Source§

impl<T: Eq + Hash> SetLike<T> for HashSet<T>

Source§

fn insert(&mut self, t: T) -> bool

Source§

fn extend(&mut self, iter: impl Iterator<Item = T>)

Source§

fn contains(&self, t: &T) -> bool

Source§

fn remove(&mut self, t: &T) -> bool

Implementors§

Source§

impl<T: Eq + PartialEq + Ord + PartialOrd> SetLike<T> for VecSet<T>