Capacity

Trait Capacity 

Source
pub trait Capacity {
    // Required method
    fn capacity(&self) -> usize;
}
Expand description

Collection with known capacity.

Required Methods§

Source

fn capacity(&self) -> usize

Returns the current capacity of the collection.

This corresponds to the number of elements the collection can hold without reallocation.

Implementations on Foreign Types§

Source§

impl<T> Capacity for VecDeque<T>

Source§

fn capacity(&self) -> usize

Source§

impl<T> Capacity for Vec<T>

Source§

fn capacity(&self) -> usize

Implementors§