Comparable

Trait Comparable 

Source
pub trait Comparable {
    // Required method
    fn ne(&self, other: &Self) -> bool;
}
Expand description

this trait allows us to overload behavior for custom types in this manner comparison can be optimized or bypassed for custom types

Required Methods§

Source

fn ne(&self, other: &Self) -> bool

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> Comparable for T
where T: PartialEq,