Trait Insert

Source
pub trait Insert: Collection {
    type Output;

    // Required method
    fn insert(&mut self, element: Self::Item) -> Self::Output;
}
Expand description

Mutable collection where new elements can be inserted.

Required Associated Types§

Source

type Output

The output of the insertion function.

Required Methods§

Source

fn insert(&mut self, element: Self::Item) -> Self::Output

Insert a new element in the collection.

Implementations on Foreign Types§

Source§

impl<T: Ord> Insert for BTreeSet<T>

Source§

type Output = bool

Source§

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

Source§

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

Source§

type Output = bool

Source§

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

Implementors§

OSZAR »