pub trait TotalEq {
// Required method
fn tot_eq(&self, other: &Self) -> bool;
// Provided method
fn tot_ne(&self, other: &Self) -> bool { ... }
}
Expand description
Alternative trait for Eq. By consistently using this we can still be generic w.r.t Eq while getting a total ordering for floats.
Required Methods§
Provided 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.