Trait kaspa_utils::vec::VecExtensions
source · pub trait VecExtensions<T> {
// Required methods
fn push_if_empty(self, value: T) -> Self;
fn swap_insert(&mut self, index: usize, value: T);
}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
Object Safety§
This trait is not object safe.