Skip to main content

SortingAlgorithm

Trait SortingAlgorithm 

Source
pub trait SortingAlgorithm: Debug + Default {
    // Required method
    fn sort_with_stats<T, S>(&self, slice: &mut [T], stats: S) -> S
       where T: Ord,
             S: SortingStatsTrait;

    // Provided method
    fn sort<'s, T: Ord>(&self, slice: &'s mut [T]) -> &'s mut [T] { ... }
}

Required Methods§

Source

fn sort_with_stats<T, S>(&self, slice: &mut [T], stats: S) -> S
where T: Ord, S: SortingStatsTrait,

Provided Methods§

Source

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

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§