Trait m6_key_set::KeySet[][src]

pub trait KeySet<T, K> {
Show methods fn new(get_key: GetKeyType<T, K>) -> Self;
fn from_intoiter(
        get_key: GetKeyType<T, K>,
        iter: impl IntoIterator<Item = T>
    ) -> Self;
fn insert(&mut self, value: T);
fn contains(&self, value: &T) -> bool;
fn remove(&mut self, value: &T) -> bool;
fn take(&mut self, value: &T) -> Option<T>;
fn get(&mut self, value: &T) -> Option<&T>;
fn len(&self) -> usize;
fn iter(&self) -> IntoIter<&T>;
fn intersection<'a>(&'a self, other: &'a Self) -> Self;
fn union<'a>(&'a self, other: &'a Self) -> Self;
fn difference<'a>(&'a self, other: &'a Self) -> Self;
fn symmetric_difference<'a>(&'a self, other: &'a Self) -> Self; fn is_subset(&self, other: &Self) -> bool { ... }
fn is_superset(&self, other: &Self) -> bool { ... }
fn is_empty(&self) -> bool { ... }
fn is_disjoint(&self, other: &Self) -> bool { ... }
}
Expand description

KeySet

Required methods

fn new(get_key: GetKeyType<T, K>) -> Self[src]

Create KeySet

fn from_intoiter(
    get_key: GetKeyType<T, K>,
    iter: impl IntoIterator<Item = T>
) -> Self
[src]

fn insert(&mut self, value: T)[src]

Operate KeySet elem

fn contains(&self, value: &T) -> bool[src]

fn remove(&mut self, value: &T) -> bool[src]

fn take(&mut self, value: &T) -> Option<T>[src]

fn get(&mut self, value: &T) -> Option<&T>[src]

fn len(&self) -> usize[src]

fn iter(&self) -> IntoIter<&T>[src]

fn intersection<'a>(&'a self, other: &'a Self) -> Self[src]

Operate with other KeySet

fn union<'a>(&'a self, other: &'a Self) -> Self[src]

fn difference<'a>(&'a self, other: &'a Self) -> Self[src]

fn symmetric_difference<'a>(&'a self, other: &'a Self) -> Self[src]

Provided methods

fn is_subset(&self, other: &Self) -> bool[src]

Check KeySet relationship

fn is_superset(&self, other: &Self) -> bool[src]

fn is_empty(&self) -> bool[src]

fn is_disjoint(&self, other: &Self) -> bool[src]

Implementors

impl<T, K> KeySet<T, K> for KeyHashSet<T, K> where
    T: Clone,
    K: Eq + Hash
[src]

fn new(get_key: GetKeyType<T, K>) -> Self[src]

fn from_intoiter(
    get_key: GetKeyType<T, K>,
    iter: impl IntoIterator<Item = T>
) -> Self
[src]

fn insert(&mut self, value: T)[src]

fn contains(&self, value: &T) -> bool[src]

fn remove(&mut self, value: &T) -> bool[src]

fn take(&mut self, value: &T) -> Option<T>[src]

fn get(&mut self, value: &T) -> Option<&T>[src]

fn len(&self) -> usize[src]

fn iter(&self) -> IntoIter<&T>[src]

fn intersection<'a>(&'a self, other: &'a Self) -> Self[src]

fn union<'a>(&'a self, other: &'a Self) -> Self[src]

fn difference<'a>(&'a self, other: &'a Self) -> Self[src]

fn symmetric_difference<'a>(&'a self, other: &'a Self) -> Self[src]