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 core::cmp.
u8s in numeric order.
instance Ord[u16, u16]source
instance Ord[u16, u16] { ... }
In core::cmp.
u16s in numeric order.
instance Ord[u32, u32]source
instance Ord[u32, u32] { ... }
In core::cmp.
u32s in numeric order.
instance Ord[u64, u64]source
instance Ord[u64, u64] { ... }
In core::cmp.
u64s in numeric order.
instance Ord[usize, usize]source
instance Ord[usize, usize] { ... }
In core::cmp.
usizes in numeric order.
instance Ord[i8, i8]source
instance Ord[i8, i8] { ... }
In core::cmp.
i8s in numeric order.
instance Ord[i16, i16]source
instance Ord[i16, i16] { ... }
In core::cmp.
i16s in numeric order.
instance Ord[i32, i32]source
instance Ord[i32, i32] { ... }
In core::cmp.
i32s in numeric order.
instance Ord[i64, i64]source
instance Ord[i64, i64] { ... }
In core::cmp.
i64s in numeric order.
instance Ord[isize, isize]source
instance Ord[isize, isize] { ... }
In core::cmp.
isizes in numeric order.
instance Ord[bool, bool]source
instance Ord[bool, bool] { ... }
In core::cmp.
false before true.
instance Ord[Buffer!, Buffer!]source
instance Ord[Buffer!, Buffer!] { ... }
In alloc::buffer.
Buffers order by their bytes, as unsigned values, a shorter prefix first.