pub trait Sort<T: PartialOrd + Clone> {
// Required methods
fn inner(&self) -> Vec<T>;
fn sort_by<F>(&mut self, f: F)
where F: FnOnce(&T, &T) -> bool + Copy;
// Provided methods
fn sort(&mut self) { ... }
fn is_sort(&self) -> bool { ... }
fn is_sort_by<F>(&self, f: F) -> bool
where F: FnOnce(&T, &T) -> bool + Copy { ... }
}
Expand description
Generic interface to sorting algorithms
Required Methods§
Provided Methods§
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.