Trait SortedInsertBinaryBy

Source
pub trait SortedInsertBinaryBy<T>: SortedInsertBy<T> {
    // Provided method
    fn sorted_insert_binary_by<F: FnMut(&T, &T) -> Ordering>(
        &mut self,
        element: T,
        f: F,
    ) -> usize { ... }
}

Provided Methods§

Source

fn sorted_insert_binary_by<F: FnMut(&T, &T) -> Ordering>( &mut self, element: T, f: F, ) -> usize

Insert elements to this sorted collection by a specific comparator 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", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> SortedInsertBinaryBy<T> for VecDeque<T>

Source§

impl<T> SortedInsertBinaryBy<T> for Vec<T>

Implementors§