pub trait InsertSorted<T> {
    // Required method
    fn insert_sorted_by_key<F: FnMut(&T) -> K, K: PartialOrd<K> + Ord>(
        &mut self,
        t: T,
        f: F
    ) -> bool;
}

Required Methods§

source

fn insert_sorted_by_key<F: FnMut(&T) -> K, K: PartialOrd<K> + Ord>( &mut self, t: T, f: F ) -> bool

Inserts an item into a sorted series.

Returns true if it was inserted, false if it would belong beyond the bound of the series.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: Ord, S: Get<u32>> InsertSorted<T> for BoundedVec<T, S>

source§

fn insert_sorted_by_key<F: FnMut(&T) -> K, K: PartialOrd<K> + Ord>( &mut self, t: T, f: F ) -> bool

Implementors§