Sorting

Trait Sorting 

Source
pub trait Sorting<'a, 'b, T: Ord + Copy + Sync + Send + Debug + Clone + PartialEq, C: ?Sized> {
    // Required methods
    fn new(data: &'a [T], config: &'b mut C) -> Self
       where Self: Sized;
    fn sorting_get_sorted_result(self) -> SortingResult<'b, T, C>;
}
Expand description

A trait to support Generic Sorting implementations

Required Methods§

Source

fn new(data: &'a [T], config: &'b mut C) -> Self
where Self: Sized,

Creates a Sorting bound to some data and some Config

Source

fn sorting_get_sorted_result(self) -> SortingResult<'b, T, C>

Obtain a sorting Result from a Sorting, by sorting the data.
This call consumes the Sorting

Implementors§

Source§

impl<'a, 'b, O: Optimizer, T: Ord + Copy + Sync + Send + Debug + Clone + PartialEq> Sorting<'a, 'b, T, BogoConfig<O, T>> for BogoSorting<'a, 'b, O, T>