SortingAlgorithm

Trait SortingAlgorithm 

Source
pub trait SortingAlgorithm {
    // Required method
    fn sort<T: Ord>(&self, slice: &mut [T]);
}
Expand description

An algorithm for sorting.

This trait identifies algorithms suitable for sorting slices.

Required Methods§

Source

fn sort<T: Ord>(&self, slice: &mut [T])

Sorts the given slice.

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§