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§
Sourcefn with_capacity(capacity: usize) -> Self
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".