Trait ComparatorFunction

Source
pub trait ComparatorFunction<T>: Debug {
    // Required method
    fn compare(_: &T, _: &T) -> Ordering;
}
Expand description

A function that can compare two Ts.

Required Methods§

Source

fn compare(_: &T, _: &T) -> Ordering

Compare the given values.

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§