pub trait WithCapacity {
// Required method
fn with_capacity(capacity: usize) -> Self;
}
Expand description
Trait for structs that can be constructed with a preallocated capacity.
Required Methods§
fn with_capacity(capacity: usize) -> Self
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.