TupleSortBySelection

Trait TupleSortBySelection 

Source
pub trait TupleSortBySelection<T> {
    // Required method
    fn sort_by_selection(&mut self, cmp: impl FnMut(&T, &T) -> Ordering);
}
Expand description

Sort tuples using selection sort

Required Methods§

Source

fn sort_by_selection(&mut self, cmp: impl FnMut(&T, &T) -> Ordering)

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> TupleSortBySelection<T> for S
where S: TupleSame<T> + TupleSwap<Output = T>,