pub trait ToComparable {
type Output: PartialOrd;
// Required method
fn to_comparable(&self) -> Self::Output;
}Expand description
Trait for types that can be converted to a comparable value for sorting.
Required Associated Types§
Sourcetype Output: PartialOrd
type Output: PartialOrd
Convert to a comparable value.
Required Methods§
Sourcefn to_comparable(&self) -> Self::Output
fn to_comparable(&self) -> Self::Output
Convert the value to a comparable type.