pub trait ContainerCapacity {
// Required methods
fn with_capacity(capacity: usize) -> Self;
fn clear(&mut self);
fn capacity(&self) -> usize;
}Expand description
Trait for containers that can be created with a specific capacity
Required Methods§
fn with_capacity(capacity: usize) -> Self
fn clear(&mut self)
fn capacity(&self) -> usize
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.