An Ordering
is the result of a comparison between two values.
Examples
use Ordering;
use cmp;
let result = 1.cmp;
assert_eq!;
let result = 1.cmp;
assert_eq!;
let result = 2.cmp;
assert_eq!;
Trait Implementations
impl PartialEq
for Ordering
Compare two values for equality.
Examples
assert_eq!;
assert_eq!;
assert_eq!;
Compare two values for inequality.
Examples
assert_eq!;
assert_eq!;
assert_eq!;
impl Eq
for Ordering
Protocols
protocol IS_VARIANT
Test if the provided argument is a variant.
protocol PARTIAL_EQ
if value == b
Perform a partial ordering equality test.
Examples
use Ordering;
assert!;
assert!;
protocol EQ
if value == b
Perform a total ordering equality test.
Examples
use eq;
use Ordering;
assert!;
assert!;