rok::core::cmp
rok::core::cmp - total equality, ordering and hashing (stdlib spec
2.5). PartialEq / PartialOrd carry the comparison operators and
stay with the other operator traits in ops.rok. Eq is a pure
marker with no methods, so it has no slot.
Enums
Ordering
pub enum OrderingThe result of a three-way comparison (2.5.4).
LessEqualGreaterpub const fn is_lt(self) -> boolpub const fn is_eq(self) -> boolpub const fn is_gt(self) -> boolpub const fn reverse(self) -> Ordering
Trait implementations 3
impl PartialEq for Orderingimpl Eq for Orderingimpl Debug for Ordering
Traits
Eq
pub trait Eq: PartialEqOrd
pub trait Ord: PartialOrd + EqA total order (2.5.5).
fn cmp(self, rhs: Self) -> Orderingconst fn min(self, rhs: Self) -> Selfconst fn max(self, rhs: Self) -> Selfconst fn clamp(self, low: Self, high: Self) -> Self
Hash
pub trait Hash: Eqa == b ⇒ a.hash() == b.hash() (2.5.6) - what Dict / Set
rely on.
fn hash(self) -> u64