pub trait VecExtensions<T> {
// Required methods
fn push_if_empty(self, value: T) -> Self;
fn swap_insert(&mut self, index: usize, value: T);
fn merge(self, other: Self) -> Self;
}Required Methods§
Sourcefn push_if_empty(self, value: T) -> Self
fn push_if_empty(self, value: T) -> Self
Pushes the provided value to the container if the container is empty
Sourcefn swap_insert(&mut self, index: usize, value: T)
fn swap_insert(&mut self, index: usize, value: T)
Inserts the provided value at index while swapping the item at index to the end of the container
Sourcefn merge(self, other: Self) -> Self
fn merge(self, other: Self) -> Self
Merges two containers one into the other and returns the result. The method is identical
to Vec<T>::append but can be used more ergonomically in a fluent calling fashion
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".