Trait scc::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,