Trait

std::cmp::Ord

source

Re-exported from core::cmp::Ord.

forall A, B.
trait Ord {
    /// How `a` orders against `b`, with both handed back.
    fn cmp(a: A, b: B) -> (A, B, Order);
}

Ordering of an A against a B, handing both back so linear values can be compared.

Methods

method cmpsource

fn cmp(a: A, b: B) -> (A, B, Order);

How a orders against b, with both handed back.

Implementors

instance Ord[Duration, Duration]source

instance Ord[Duration, Duration] { ... }

In std::time.

The shorter duration orders first.

instance Ord[Instant, Instant]source

instance Ord[Instant, Instant] { ... }

In std::time.

The earlier reading orders first.

instance Ord[u8, u8]source

instance Ord[u8, u8] { ... }

In std::cmp.

u8s in numeric order.

instance Ord[u16, u16]source

instance Ord[u16, u16] { ... }

In std::cmp.

u16s in numeric order.

instance Ord[u32, u32]source

instance Ord[u32, u32] { ... }

In std::cmp.

u32s in numeric order.

instance Ord[u64, u64]source

instance Ord[u64, u64] { ... }

In std::cmp.

u64s in numeric order.

instance Ord[usize, usize]source

instance Ord[usize, usize] { ... }

In std::cmp.

usizes in numeric order.

instance Ord[i8, i8]source

instance Ord[i8, i8] { ... }

In std::cmp.

i8s in numeric order.

instance Ord[i16, i16]source

instance Ord[i16, i16] { ... }

In std::cmp.

i16s in numeric order.

instance Ord[i32, i32]source

instance Ord[i32, i32] { ... }

In std::cmp.

i32s in numeric order.

instance Ord[i64, i64]source

instance Ord[i64, i64] { ... }

In std::cmp.

i64s in numeric order.

instance Ord[isize, isize]source

instance Ord[isize, isize] { ... }

In std::cmp.

isizes in numeric order.

instance Ord[bool, bool]source

instance Ord[bool, bool] { ... }

In std::cmp.

false before true.

instance Ord[Buffer!, Buffer!]source

instance Ord[Buffer!, Buffer!] { ... }

In std::buffer.

Buffers order by their bytes, as unsigned values, a shorter prefix first.