Trait len_trait::DefaultCapacity
[−]
[src]
pub trait DefaultCapacity: Capacity + Default { fn default_capacity(capacity: usize) -> Self; }
A collection which can be created with a certain capacity.
Creating a collection with a given capacity should take O(n) time and space with respect to the
requested capacity. A Default
value must have a capacity of either 0 or usize::MAX
.
Required Methods
fn default_capacity(capacity: usize) -> Self
Creates a value of the given capacity.
Implementors
impl<T: Ord> DefaultCapacity for BinaryHeap<T>
impl DefaultCapacity for String
impl<T> DefaultCapacity for Vec<T>
impl<T> DefaultCapacity for VecDeque<T>