pub trait ToOrd: Sized + Copy {
type Ord: Ord;
// Required method
fn to_ord(self) -> Self::Ord;
// Provided method
fn total_eq(self, rhs: Self) -> bool { ... }
}Expand description
A trait that converts a floating point number into something implementing total ordering.
The behavior of this trait is unspecified for NaN, and may result in a logic error.
Required Associated Types§
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.