Trait Resize

Source
pub trait Resize<T>: Cap + Ptr<T> {
    // Provided method
    fn __resize(&mut self, new_cap: usize) { ... }
}
Expand description

Trait Resize<T>

Resizes the allocation to a specified capacity directly.

  • __resize - Changes capacity to a given number of elements.

Provided Methods§

Source

fn __resize(&mut self, new_cap: usize)

Resizes the allocation to the specified capacity.

§Arguments
  • new_cap - The desired new capacity.
§Panics
  • Panics if the allocation size exceeds isize::MAX.

Implementors§