referrerpolicy=no-referrer-when-downgrade
pallet_referenda

Trait InsertSorted

Source
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.

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: 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§