Trait SelectionSet

Source
pub trait SelectionSet {
    type Index;

    // Required methods
    fn to_vec(&self) -> Vec<Self::Index>;
    fn contains(&self, index: &Self::Index) -> bool;
    fn insert(&mut self, index: Self::Index);
    fn remove(&mut self, index: &Self::Index);
    fn clear(&mut self);

    // Provided method
    fn single(&mut self, index: Self::Index) { ... }
}

Required Associated Types§

Required Methods§

Source

fn to_vec(&self) -> Vec<Self::Index>

Source

fn contains(&self, index: &Self::Index) -> bool

Source

fn insert(&mut self, index: Self::Index)

Source

fn remove(&mut self, index: &Self::Index)

Source

fn clear(&mut self)

Provided Methods§

Source

fn single(&mut self, index: Self::Index)

Implementations on Foreign Types§

Source§

impl<I: Clone + Eq + Hash> SelectionSet for HashSet<I>

Source§

type Index = I

Source§

fn to_vec(&self) -> Vec<I>

Source§

fn contains(&self, index: &I) -> bool

Source§

fn insert(&mut self, index: I)

Source§

fn remove(&mut self, index: &I)

Source§

fn clear(&mut self)

Source§

fn single(&mut self, index: I)

Source§

impl<I: Clone + Ord> SelectionSet for BTreeSet<I>

Source§

type Index = I

Source§

fn to_vec(&self) -> Vec<I>

Source§

fn contains(&self, index: &I) -> bool

Source§

fn insert(&mut self, index: I)

Source§

fn remove(&mut self, index: &I)

Source§

fn clear(&mut self)

Source§

fn single(&mut self, index: I)

Implementors§