pub trait NumOrd<Other> {
    fn num_partial_cmp(&self, other: &Other) -> Option<Ordering>;

    fn num_eq(&self, other: &Other) -> bool { ... }
    fn num_ne(&self, other: &Other) -> bool { ... }
    fn num_lt(&self, other: &Other) -> bool { ... }
    fn num_le(&self, other: &Other) -> bool { ... }
    fn num_gt(&self, other: &Other) -> bool { ... }
    fn num_ge(&self, other: &Other) -> bool { ... }
    fn num_cmp(&self, other: &Other) -> Ordering { ... }
}
Expand description

Consistent comparison among different numeric types.

Required Methods

PartialOrd::partial_cmp on different numeric types

Provided Methods

PartialEq::eq on different numeric types

PartialEq::ne on different numeric types

PartialOrd::lt on different numeric types

PartialOrd::le on different numeric types

PartialOrd::gt on different numeric types

PartialOrd::ge on different numeric types

Ord::cmp on different numeric types. It panics if either of the numeric values contains NaN.

Implementations on Foreign Types

Implementors