pub unsafe trait StorageWithCapacity: Storage + Sized {
// Required method
fn with_capacity(capacity: usize) -> Self;
}Expand description
A storage that can be initially created with a given capacity
§Safety
The storage must have a capacity of at least capacity after
StorageWithCapacity::with_capacity is called.
Required Methods§
Sourcefn with_capacity(capacity: usize) -> Self
fn with_capacity(capacity: usize) -> Self
Creates a new storage with at least the given storage 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.