pub trait SortedInsertBinary<T: Ord>: SortedInsertBinaryByKey<T> {
// Provided methods
fn sorted_insert_asc_binary(&mut self, element: T) -> usize { ... }
fn sorted_insert_desc_binary(&mut self, element: T) -> usize { ... }
}Provided Methods§
Sourcefn sorted_insert_asc_binary(&mut self, element: T) -> usize
fn sorted_insert_asc_binary(&mut self, element: T) -> usize
Insert an element to this sorted collection in ascending order and return the inserted index. Use binary search to find the index where a matching element could be inserted.
Sourcefn sorted_insert_desc_binary(&mut self, element: T) -> usize
fn sorted_insert_desc_binary(&mut self, element: T) -> usize
Insert an element to this sorted collection in descending order and return the inserted index. Use binary search to find the index where a matching element could be inserted.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
impl<T: Ord> SortedInsertBinary<T> for Vec<T>
impl<T: Ord> SortedInsertBinary<T> for VecDeque<T>
Available on crate feature
std only.