Functionality for ordering and comparison.
This module defines both
PartialEq traits which are used
by the compiler to implement comparison operators. Rust programs may
PartialOrd to overload the
and may implement
PartialEq to overload the
let x: u32 = 0; let y: u32 = 1; // these two lines are equivalent assert_eq!(x < y, true); assert_eq!(x.lt(&y), true); // these two lines are also equivalent assert_eq!(x == y, false); assert_eq!(x.eq(&y), false);Run
A helper struct for reverse ordering.
Trait for equality comparisons which are equivalence relations.
Trait for types that form a total order.
Trait for equality comparisons which are partial equivalence relations.
Trait for values that can be compared for a sort-order.
Compares and returns the maximum of two values.
Compares and returns the minimum of two values.