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

Creates a value of the given capacity.

Implementors