pub trait Sortable {
// Required methods
fn swap(&mut self, i: usize, j: usize);
fn compare(&self, i: usize, j: usize) -> Ordering;
}Expand description
Sortable is defined for types that should be allowed to be sorted.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<S: Sortable, T: Sortable> Sortable for (S, T)
Tuples of sortable elements are sortable within their common range
impl<S: Sortable, T: Sortable> Sortable for (S, T)
Tuples of sortable elements are sortable within their common range