Trait MutableSet

Source
pub trait MutableSet {
    type Item: Debug + 'static;

    // Required methods
    fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Self::Item> + 'a>;
    fn is_empty(&self) -> bool;
    fn contains(&self, value: &Self::Item) -> bool;
    fn insert(&mut self, value: Self::Item);
    fn remove(&mut self, value: &Self::Item);
    fn is_subset(&self, rhs: &Self) -> bool;
    fn is_superset(&self, rhs: &Self) -> bool;
    fn is_disjoint(&self, rhs: &Self) -> bool;
}

Required Associated Types§

Source

type Item: Debug + 'static

Required Methods§

Source

fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Self::Item> + 'a>

Source

fn is_empty(&self) -> bool

Source

fn contains(&self, value: &Self::Item) -> bool

Source

fn insert(&mut self, value: Self::Item)

Source

fn remove(&mut self, value: &Self::Item)

Source

fn is_subset(&self, rhs: &Self) -> bool

Source

fn is_superset(&self, rhs: &Self) -> bool

Source

fn is_disjoint(&self, rhs: &Self) -> 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: Ord + Debug + 'static> MutableSet for BTreeSet<T>

Source§

type Item = T

Source§

fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Self::Item> + 'a>

Source§

fn is_empty(&self) -> bool

Source§

fn contains(&self, value: &Self::Item) -> bool

Source§

fn insert(&mut self, value: Self::Item)

Source§

fn remove(&mut self, value: &Self::Item)

Source§

fn is_subset(&self, rhs: &Self) -> bool

Source§

fn is_superset(&self, rhs: &Self) -> bool

Source§

fn is_disjoint(&self, rhs: &Self) -> bool

Source§

impl<T: Hash + Eq + Debug + 'static, S: BuildHasher + Default> MutableSet for HashSet<T, S>

Source§

type Item = T

Source§

fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Self::Item> + 'a>

Source§

fn is_empty(&self) -> bool

Source§

fn contains(&self, value: &Self::Item) -> bool

Source§

fn insert(&mut self, value: Self::Item)

Source§

fn remove(&mut self, value: &Self::Item)

Source§

fn is_subset(&self, rhs: &Self) -> bool

Source§

fn is_superset(&self, rhs: &Self) -> bool

Source§

fn is_disjoint(&self, rhs: &Self) -> bool

Implementors§