Skip to main content

ClearInto

Trait ClearInto 

Source
pub trait ClearInto {
    // Required method
    fn clear_into(&mut self);
}
Expand description

Trait for types that can be cleared in place. Implemented for the collection types used as cache values (HashMap, Vec).

Required Methods§

Source

fn clear_into(&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, S> ClearInto for HashMap<K, V, S>
where S: BuildHasher,

Source§

fn clear_into(&mut self)

Source§

impl<T> ClearInto for Vec<T>

Source§

fn clear_into(&mut self)

Implementors§