#[repr(i8)]pub enum Ordering {
Less = -1,
Equal = 0,
Greater = 1,
}
Expand description
An Ordering
is the result of a comparison between two values.
§Examples
use std::cmp::Ordering;
assert_eq!(1.cmp(&2), Ordering::Less);
assert_eq!(1.cmp(&1), Ordering::Equal);
assert_eq!(2.cmp(&1), Ordering::Greater);