ToComparable

Trait ToComparable 

Source
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§

Source

type Output: PartialOrd

Convert to a comparable value.

Required Methods§

Source

fn to_comparable(&self) -> Self::Output

Convert the value to a comparable type.

Implementations on Foreign Types§

Source§

impl ToComparable for &str

Source§

impl ToComparable for f32

Source§

impl ToComparable for f64

Source§

impl ToComparable for i32

Source§

impl ToComparable for i64

Source§

impl ToComparable for u32

Source§

impl ToComparable for u64

Source§

impl ToComparable for String

Implementors§