Skip to main content

SliceSortExt

Trait SliceSortExt 

Source
pub trait SliceSortExt<T> {
    // Required methods
    fn bubble_sort(&mut self)
       where T: Ord;
    fn bubble_sort_by<F>(&mut self, compare: F)
       where F: FnMut(&T, &T) -> Ordering;
    fn merge_sort(&mut self)
       where T: Ord;
    fn merge_sort_by<F>(&mut self, compare: F)
       where F: FnMut(&T, &T) -> Ordering;
    fn insertion_sort(&mut self)
       where T: Ord;
    fn insertion_sort_by<F>(&mut self, compare: F)
       where F: FnMut(&T, &T) -> Ordering;
}

Required Methods§

Source

fn bubble_sort(&mut self)
where T: Ord,

Source

fn bubble_sort_by<F>(&mut self, compare: F)
where F: FnMut(&T, &T) -> Ordering,

Source

fn merge_sort(&mut self)
where T: Ord,

Source

fn merge_sort_by<F>(&mut self, compare: F)
where F: FnMut(&T, &T) -> Ordering,

Source

fn insertion_sort(&mut self)
where T: Ord,

Source

fn insertion_sort_by<F>(&mut self, compare: F)
where F: FnMut(&T, &T) -> Ordering,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> SliceSortExt<T> for [T]

Source§

fn bubble_sort(&mut self)
where T: Ord,

Source§

fn bubble_sort_by<F>(&mut self, compare: F)
where F: FnMut(&T, &T) -> Ordering,

Source§

fn merge_sort(&mut self)
where T: Ord,

Source§

fn merge_sort_by<F>(&mut self, compare: F)
where F: FnMut(&T, &T) -> Ordering,

Source§

fn insertion_sort(&mut self)
where T: Ord,

Source§

fn insertion_sort_by<F>(&mut self, compare: F)
where F: FnMut(&T, &T) -> Ordering,

Implementors§