pub trait DynamicArrayExt<T> {
// Required methods
fn reserve_exact_fast(&mut self, additional: usize);
fn extend_from_slice_fast(&mut self, slice: &[T])
where T: Clone;
fn clear_and_resize(&mut self, new_capacity: usize);
}Expand description
Extension trait for DynamicArray with optimized methods
Required Methods§
Sourcefn reserve_exact_fast(&mut self, additional: usize)
fn reserve_exact_fast(&mut self, additional: usize)
Reserve exact capacity without over-allocating
Sourcefn extend_from_slice_fast(&mut self, slice: &[T])where
T: Clone,
fn extend_from_slice_fast(&mut self, slice: &[T])where
T: Clone,
Extend from slice with capacity pre-check
Sourcefn clear_and_resize(&mut self, new_capacity: usize)
fn clear_and_resize(&mut self, new_capacity: usize)
Clear and set to specific capacity