Trait numcmp::NumCmp [−][src]
A trait for comparison between differently typed numbers.
This trait is implemented for every pair of integer and floating-point types available,
including isize
, usize
and also i128
and u128
.
Required methods
fn num_cmp(self, other: Other) -> Option<Ordering>
[src]
Same to self.partial_cmp(&other)
but can be used for different numeric types for self
and other
.
fn num_eq(self, other: Other) -> bool
[src]
Same to self == other
but can be used for different numeric types for self
and other
.
fn num_ne(self, other: Other) -> bool
[src]
Same to self != other
but can be used for different numeric types for self
and other
.
fn num_lt(self, other: Other) -> bool
[src]
Same to self < other
but can be used for different numeric types for self
and other
.
fn num_gt(self, other: Other) -> bool
[src]
Same to self > other
but can be used for different numeric types for self
and other
.
fn num_le(self, other: Other) -> bool
[src]
Same to self <= other
but can be used for different numeric types for self
and other
.
fn num_ge(self, other: Other) -> bool
[src]
Same to self >= other
but can be used for different numeric types for self
and other
.