Trait ShrinkToFit
pub trait ShrinkToFit {
// Required method
fn shrink_to_fit(&mut self);
}Expand description
Recursively calls shrink_to_fit on all elements of the container.
Required Methods§
fn shrink_to_fit(&mut self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
§impl ShrinkToFit for ()
impl ShrinkToFit for ()
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for Duration
impl ShrinkToFit for Duration
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for OsString
impl ShrinkToFit for OsString
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for PathBuf
impl ShrinkToFit for PathBuf
fn shrink_to_fit(&mut self)
Source§impl ShrinkToFit for RcStr
noop
impl ShrinkToFit for RcStr
noop
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for String
impl ShrinkToFit for String
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for Value
impl ShrinkToFit for Value
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for bool
impl ShrinkToFit for bool
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for char
impl ShrinkToFit for char
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for f32
impl ShrinkToFit for f32
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for f64
impl ShrinkToFit for f64
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for i8
impl ShrinkToFit for i8
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for i16
impl ShrinkToFit for i16
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for i32
impl ShrinkToFit for i32
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for i64
impl ShrinkToFit for i64
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for i128
impl ShrinkToFit for i128
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for isize
impl ShrinkToFit for isize
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for u8
impl ShrinkToFit for u8
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for u16
impl ShrinkToFit for u16
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for u32
impl ShrinkToFit for u32
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for u64
impl ShrinkToFit for u64
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for u128
impl ShrinkToFit for u128
fn shrink_to_fit(&mut self)
§impl ShrinkToFit for usize
impl ShrinkToFit for usize
fn shrink_to_fit(&mut self)
§impl<K, H, const I: usize> ShrinkToFit for AutoSet<K, H, I>
impl<K, H, const I: usize> ShrinkToFit for AutoSet<K, H, I>
fn shrink_to_fit(&mut self)
§impl<K, S> ShrinkToFit for HashSet<K, S>
impl<K, S> ShrinkToFit for HashSet<K, S>
fn shrink_to_fit(&mut self)
§impl<K, S> ShrinkToFit for HashSet<K, S>
Available on crate feature hashbrown only.
impl<K, S> ShrinkToFit for HashSet<K, S>
Available on crate feature
hashbrown only.fn shrink_to_fit(&mut self)
§impl<K, S> ShrinkToFit for IndexSet<K, S>
Available on crate feature indexmap only.
impl<K, S> ShrinkToFit for IndexSet<K, S>
Available on crate feature
indexmap only.fn shrink_to_fit(&mut self)
§impl<K, V, H, const I: usize> ShrinkToFit for AutoMap<K, V, H, I>
impl<K, V, H, const I: usize> ShrinkToFit for AutoMap<K, V, H, I>
fn shrink_to_fit(&mut self)
§impl<K, V, S> ShrinkToFit for HashMap<K, V, S>
impl<K, V, S> ShrinkToFit for HashMap<K, V, S>
fn shrink_to_fit(&mut self)
§impl<K, V, S> ShrinkToFit for HashMap<K, V, S>
Available on crate feature hashbrown only.
impl<K, V, S> ShrinkToFit for HashMap<K, V, S>
Available on crate feature
hashbrown only.fn shrink_to_fit(&mut self)
§impl<K, V, S> ShrinkToFit for IndexMap<K, V, S>
Available on crate feature indexmap only.
impl<K, V, S> ShrinkToFit for IndexMap<K, V, S>
Available on crate feature
indexmap only.fn shrink_to_fit(&mut self)
§impl<T> ShrinkToFit for &mut Twhere
T: ShrinkToFit + ?Sized,
impl<T> ShrinkToFit for &mut Twhere
T: ShrinkToFit + ?Sized,
fn shrink_to_fit(&mut self)
§impl<T> ShrinkToFit for BinaryHeap<T>where
T: Ord,
impl<T> ShrinkToFit for BinaryHeap<T>where
T: Ord,
fn shrink_to_fit(&mut self)
§impl<T> ShrinkToFit for Box<T>where
T: ShrinkToFit + ?Sized,
impl<T> ShrinkToFit for Box<T>where
T: ShrinkToFit + ?Sized,
fn shrink_to_fit(&mut self)
§impl<T> ShrinkToFit for Option<T>where
T: ShrinkToFit,
impl<T> ShrinkToFit for Option<T>where
T: ShrinkToFit,
fn shrink_to_fit(&mut self)
§impl<T> ShrinkToFit for SmallVec<T>where
T: Array,
Available on crate feature smallvec only.
impl<T> ShrinkToFit for SmallVec<T>where
T: Array,
Available on crate feature
smallvec only.fn shrink_to_fit(&mut self)
§impl<T> ShrinkToFit for Vec<T>
If nightly cargo feature is enabled, T::shrink_to_fit will be called if
T implements ShrinkToFit.
impl<T> ShrinkToFit for Vec<T>
If nightly cargo feature is enabled, T::shrink_to_fit will be called if
T implements ShrinkToFit.