SorterExt

Trait SorterExt 

Source
pub trait SorterExt: Sorter {
    // Provided methods
    fn to_if<Cushion, F, TransF>(
        self,
        f: F,
        transformer: TransF,
    ) -> impl Sorter<Context = Cushion>
       where Self: Sized,
             Cushion: Sync + Send,
             F: Fn(&Cushion) -> bool + Send,
             TransF: Fn(&Cushion) -> <Self as Sorter>::Context + Send,
             <Self as Sorter>::Context: Sync + Send { ... }
    fn reverse(self) -> impl Sorter<Context = <Self as Sorter>::Context>
       where Self: Sized,
             <Self as Sorter>::Context: Sync + Send { ... }
}

Provided Methods§

Source

fn to_if<Cushion, F, TransF>( self, f: F, transformer: TransF, ) -> impl Sorter<Context = Cushion>
where Self: Sized, Cushion: Sync + Send, F: Fn(&Cushion) -> bool + Send, TransF: Fn(&Cushion) -> <Self as Sorter>::Context + Send, <Self as Sorter>::Context: Sync + Send,

Source

fn reverse(self) -> impl Sorter<Context = <Self as Sorter>::Context>
where Self: Sized, <Self as Sorter>::Context: Sync + Send,

Implementors§

Source§

impl<T> SorterExt for T
where T: Sorter,