Skip to main content

CollectionMut

Trait CollectionMut 

Source
pub trait CollectionMut: Collection {
    // Required method
    fn clear(&mut self);
}
Expand description

A trait for collections of items.

Required Methods§

Source

fn clear(&mut self)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<K, V> CollectionMut for BTreeMap<K, V>
where K: Ord,

Source§

fn clear(&mut self)

Source§

impl<K, V> CollectionMut for HashMap<K, V>
where K: Eq + Hash,

Available on crate feature std only.
Source§

fn clear(&mut self)

Source§

impl<T> CollectionMut for BTreeSet<T>
where T: Ord,

Source§

fn clear(&mut self)

Source§

impl<T> CollectionMut for BinaryHeap<T>
where T: Ord,

Source§

fn clear(&mut self)

Source§

impl<T> CollectionMut for HashSet<T>
where T: Eq + Hash,

Available on crate feature std only.
Source§

fn clear(&mut self)

Source§

impl<T> CollectionMut for LinkedList<T>

Source§

fn clear(&mut self)

Source§

impl<T> CollectionMut for Vec<T>

Source§

fn clear(&mut self)

Source§

impl<T> CollectionMut for VecDeque<T>

Source§

fn clear(&mut self)

Implementors§