Trait WithCapacity

Source
pub trait WithCapacity {
    // Required method
    fn with_capacity(capacity: usize) -> Self;
}
Expand description

Collection that can be created with a minimum given capacity.

Required Methods§

Source

fn with_capacity(capacity: usize) -> Self

Creates a new instance of Self with the given minimum capacity.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> WithCapacity for VecDeque<T>

Source§

fn with_capacity(capacity: usize) -> Self

Source§

impl<T> WithCapacity for Vec<T>

Source§

fn with_capacity(capacity: usize) -> Self

Implementors§

OSZAR »