pub trait OrdArithmetic<T>: Arithmetic<T> {
// Required method
fn partial_cmp(&self, x: &T, y: &T) -> Option<Ordering>;
}
Expand description
Extends an Arithmetic
with a comparison operation on values.
Compares two values. Returns None
if the numbers are not comparable, or the comparison
result otherwise.
Checks if two values are equal. Note that equality can be a non-trivial operation;
e.g., different numbers may be equal as per modular arithmetic.
Formats the value using the given formatter.
Read more
Compares two values. Returns None
if the numbers are not comparable, or the comparison
result otherwise.