Skip to main content

ShrinkIfNeeded

Trait ShrinkIfNeeded 

Source
pub(crate) trait ShrinkIfNeeded {
    // Required method
    fn shrink_if_needed(&mut self);
}
Expand description

Shrink the capacity of the collection if needed.

Required Methods§

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, H> ShrinkIfNeeded for HashMap<K, V, H>
where K: Eq + Hash, H: BuildHasher,

Source§

impl<T, H> ShrinkIfNeeded for HashSet<T, H>
where T: Eq + Hash, H: BuildHasher,

Implementors§