Skip to main content

Clearable

Trait Clearable 

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

A clearable trait for objects that can be reset for reuse.

Required Methods§

Source

fn clear_for_reuse(&mut self)

Clears the object’s contents while preserving capacity.

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> Clearable for HashMap<K, V>

Source§

impl<T> Clearable for Vec<T>

Implementors§