Skip to main content

TupleSortByKeySelection

Trait TupleSortByKeySelection 

Source
pub trait TupleSortByKeySelection<T> {
    // Required method
    fn sort_by_key_selection<K>(&mut self, selector: impl FnMut(&T) -> K)
       where K: PartialOrd;
}
Expand description

Sort tuples using selection sort

Required Methods§

Source

fn sort_by_key_selection<K>(&mut self, selector: impl FnMut(&T) -> K)
where K: PartialOrd,

Sort tuples using selection sort

It has an O(n2) time complexity

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.

Implementors§

Source§

impl<T, S> TupleSortByKeySelection<T> for S
where S: TupleSame<T> + TupleSwap<Output = T>,