Trait Collate

Source
pub trait Collate: Sized + Eq {
    type Value;

    // Required method
    fn cmp(&self, left: &Self::Value, right: &Self::Value) -> Ordering;
}
Expand description

A collator for type Value.

Required Associated Types§

Required Methods§

Source

fn cmp(&self, left: &Self::Value, right: &Self::Value) -> Ordering

Return the collation of the left value relative to the right value.

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.

Implementors§

Source§

impl<T: Ord> Collate for Collator<T>

Source§

type Value = T