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§
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.