scc

Trait Comparable

Source
pub trait Comparable<K: ?Sized>: Equivalent<K> {
    // Required method
    fn compare(&self, key: &K) -> Ordering;
}
Expand description

Key ordering trait.

Required Methods§

Source

fn compare(&self, key: &K) -> Ordering

Compares self to key and returns their ordering.

Implementors§

Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,