[][src]Trait totally_ordered::TotallyOrderable

pub trait TotallyOrderable {
    fn total_eq(&self, other: &Self) -> bool;
fn total_cmp(&self, other: &Self) -> Ordering;
fn total_hash<H: Hasher>(&self, state: &mut H); }

Implement this for types that are not directly Ord + Eq, but can be at a slightly higher runtime cost. Implemented for f32 and f64.

Required methods

fn total_eq(&self, other: &Self) -> bool

A true equality comparison. Can be more expensive than standard PartialEq.

fn total_cmp(&self, other: &Self) -> Ordering

A totally ordered comparison. Can be more expensive than standard PartialOrd.

fn total_hash<H: Hasher>(&self, state: &mut H)

A hashing function that matches total_eq. As the wrapped type doesn't implement Eq, it can't be Hash directly.

Loading content...

Implementors

impl TotallyOrderable for f32[src]

Implements the IEEE 754-2008 binary32/binary64 total ordering predicate.

impl TotallyOrderable for f64[src]

Implements the IEEE 754-2008 binary32/binary64 total ordering predicate.

Loading content...