pub trait ContainerReserve {
// Required method
fn reserve(&mut self, additional: usize);
}Expand description
A trait to reserve space in a container, in case you know how many values are about to enter and can avoid reallocations by reserving more space at once.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".