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).
Used by lock_or_clear_cache to wipe cache data after a poisoned
mutex recovery, since a partially-mutated cache (from a panic
mid-insert) must not be reused on subsequent frames.
Required Methods§
fn clear_into(&mut self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".