std::cmp::Ord - Rust (original) (raw)
Trait std::cmp::Ord1.0.0 [โ] [src]
pub trait Ord: Eq + PartialOrd { fn cmp(&self, other: &Self) -> Ordering;
fn [max](#method.max)(self, other: Self) -> Self { ... }
fn [min](#method.min)(self, other: Self) -> Self { ... }
}
Trait for types that form a total order.
An order is a total order if it is (for all a
, b
and c
):
- total and antisymmetric: exactly one of
a < b
,a == b
ora > b
is true; and - transitive,
a < b
andb < c
impliesa < c
. The same must hold for both==
and>
.
This trait can be used with #[derive]
. When derive
d on structs, it will produce a lexicographic ordering based on the top-to-bottom declaration order of the struct's members. When derive
d on enums, variants are ordered by their top-to-bottom declaration order.
Ord
requires that the type also be PartialOrd
and Eq
(which requires PartialEq
).
Then you must define an implementation for cmp()
. You may find it useful to usecmp()
on your type's fields.
Implementations of PartialEq
, PartialOrd
, and Ord
must agree with each other. It's easy to accidentally make them disagree by deriving some of the traits and manually implementing others.
Here's an example where you want to sort people by height only, disregarding id
and name
:
use std::cmp::Ordering;
#[derive(Eq)] struct Person { id: u32, name: String, height: u32, }
impl Ord for Person { fn cmp(&self, other: &Person) -> Ordering { self.height.cmp(&other.height) } }
impl PartialOrd for Person { fn partial_cmp(&self, other: &Person) -> Option { Some(self.cmp(other)) } }
impl PartialEq for Person { fn eq(&self, other: &Person) -> bool { self.height == other.height } }Run
fn [cmp](#tymethod.cmp)(&self, other: [&](../primitive.reference.html)Self) -> [Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")
This method returns an Ordering
between self
and other
.
By convention, self.cmp(&other)
returns the ordering matching the expressionself <operator> other
if true.
use std::cmp::Ordering;
assert_eq!(5.cmp(&10), Ordering::Less); assert_eq!(10.cmp(&5), Ordering::Greater); assert_eq!(5.cmp(&5), Ordering::Equal);Run
fn [max](#method.max)(self, other: Self) -> Self
1.21.0
Compares and returns the maximum of two values.
Returns the second argument if the comparison determines them to be equal.
assert_eq!(2, 1.max(2)); assert_eq!(2, 2.max(2));Run
fn [min](#method.min)(self, other: Self) -> Self
1.21.0
Compares and returns the minimum of two values.
Returns the first argument if the comparison determines them to be equal.
assert_eq!(1, 1.min(2)); assert_eq!(2, 2.min(2));Run
`impl Ord for NonZero where
impl<T> Ord for [[](../primitive.array.html)T[; 29]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G, H, I> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 17]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<A, B, C, D, E, F, G, H, I, J, K, L> Ord for [(](../primitive.tuple.html)A, B, C, D, E, F, G, H, I, J, K, L[)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), C: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), D: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), E: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), F: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), G: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), H: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), I: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), J: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), K: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), L: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<T> Ord for [[](../primitive.array.html)T[; 12]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C) -> Ret
impl<Ret, A, B> Ord for extern "C" [fn](../primitive.fn.html)(A, B) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 10]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, ...) -> Ret
impl Ord for [NoneError](../../std/option/struct.NoneError.html "struct std::option::NoneError")
impl<Ret, A, B, C, D, E, F> Ord for [fn](../primitive.fn.html)(A, B, C, D, E, F) -> Ret
impl<T> Ord for [*mut T](../primitive.pointer.html) where T: ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl Ord for [u16](../primitive.u16.html)
impl<Ret, A, B, C, D, E, F, G, H, I> Ord for [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I) -> Ret
impl Ord for [Ordering](../../std/cmp/enum.Ordering.html "enum std::cmp::Ordering")
impl<T> Ord for [NonNull](../../std/ptr/struct.NonNull.html "struct std::ptr::NonNull")<T> where T: ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<T> Ord for [[](../primitive.array.html)T[; 25]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B> Ord for unsafe [fn](../primitive.fn.html)(A, B) -> Ret
impl<T> Ord for [RefCell](../../std/cell/struct.RefCell.html "struct std::cell::RefCell")<T> where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<Ret, A, B, C, D, E, F, G> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret
impl<Ret, A, B, C, D, E, F> Ord for unsafe [fn](../primitive.fn.html)(A, B, C, D, E, F) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 6]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<T> Ord for [[](../primitive.array.html)T[; 28]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<T> Ord for [[](../primitive.array.html)T[; 9]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G, H, I> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I) -> Ret
impl Ord for [u128](../primitive.u128.html)
impl Ord for [bool](../primitive.bool.html)
impl<T> Ord for [[](../primitive.array.html)T[; 20]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<'a, A> Ord for [&'a ](../primitive.reference.html)A where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<T> Ord for [Wrapping](../../std/num/struct.Wrapping.html "struct std::num::Wrapping")<T> where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A> Ord for extern "C" [fn](../primitive.fn.html)(A) -> Ret
impl<Ret, A, B> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B) -> Ret
impl<Ret> Ord for extern "C" [fn](../primitive.fn.html)() -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 1]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Ord for unsafe [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
impl<Ret, A, B, C> Ord for unsafe [fn](../primitive.fn.html)(A, B, C) -> Ret
impl<Ret, A> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, ...) -> Ret
impl<Ret, A, B, C, D> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D) -> Ret
impl<A, B, C, D> Ord for [(](../primitive.tuple.html)A, B, C, D[)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), C: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), D: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<A, B, C> Ord for [(](../primitive.tuple.html)A, B, C[)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), C: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl Ord for [u8](../primitive.u8.html)
impl Ord for [Infallible](../../std/convert/enum.Infallible.html "enum std::convert::Infallible")
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
impl<Ret, A, B, C, D, E, F, G, H> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H) -> Ret
impl<Ret, A, B, C, D, E, F, G, H> Ord for unsafe [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 30]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret
impl<Ret, A, B, C, D, E> Ord for unsafe [fn](../primitive.fn.html)(A, B, C, D, E) -> Ret
impl Ord for [TypeId](../../std/any/struct.TypeId.html "struct std::any::TypeId")
impl<T> Ord for [Reverse](../../std/cmp/struct.Reverse.html "struct std::cmp::Reverse")<T> where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E> Ord for [fn](../primitive.fn.html)(A, B, C, D, E) -> Ret
impl<Ret, A, B, C, D, E, F> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 21]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G, H, I, J> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 31]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, ...) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 19]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<T> Ord for [Cell](../../std/cell/struct.Cell.html "struct std::cell::Cell")<T> where T: [Copy](../../std/marker/trait.Copy.html "trait std:๐:Copy") + [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl Ord for [u64](../primitive.u64.html)
impl Ord for [i128](../primitive.i128.html)
impl Ord for [i32](../primitive.i32.html)
impl Ord for [()](../primitive.unit.html)
impl<Ret, A, B, C, D, E, F, G, H, I, J> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, ...) -> Ret
impl<Ret> Ord for unsafe [fn](../primitive.fn.html)() -> Ret
impl<Ret, A, B, C> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C) -> Ret
impl<A, B, C, D, E, F, G, H> Ord for [(](../primitive.tuple.html)A, B, C, D, E, F, G, H[)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), C: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), D: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), E: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), F: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), G: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), H: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<Ret, A, B, C, D, E, F, G> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, ...) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 15]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G, H> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, ...) -> Ret
impl<Ret, A, B, C, D, E> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, ...) -> Ret
impl<T> Ord for [[](../primitive.slice.html)T[]](../primitive.slice.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<A, B, C, D, E, F> Ord for [(](../primitive.tuple.html)A, B, C, D, E, F[)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), C: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), D: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), E: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), F: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl Ord for [usize](../primitive.usize.html)
impl Ord for [Duration](../../std/time/struct.Duration.html "struct std::time::Duration")
impl<Y, R> Ord for [GeneratorState](../../std/ops/enum.GeneratorState.html "enum std::ops::GeneratorState")<Y, R> where R: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), Y: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<T> Ord for [[](../primitive.array.html)T[; 7]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G, H, I, J> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G> Ord for unsafe [fn](../primitive.fn.html)(A, B, C, D, E, F, G) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Ord for unsafe [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K) -> Ret
impl<A, B, C, D, E, F, G, H, I, J> Ord for [(](../primitive.tuple.html)A, B, C, D, E, F, G, H, I, J[)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), C: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), D: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), E: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), F: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), G: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), H: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), I: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), J: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<Ret, A, B, C, D, E, F, G, H> Ord for [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, ...) -> Ret
impl<Ret, A> Ord for extern "C" [fn](../primitive.fn.html)(A, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K, L, ...) -> Ret
impl<Ret, A, B, C, D, E> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E) -> Ret
impl Ord for [Error](../../std/fmt/struct.Error.html "struct std::fmt::Error")
impl<Ret, A, B, C, D, E, F, G, H> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, ...) -> Ret
impl<Ret, A, B, C, D, E, F> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, ...) -> Ret
impl<Ret, A, B, C, D, E> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 3]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G, H, I, J> Ord for [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 0]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl Ord for [i64](../primitive.i64.html)
impl<T> Ord for [[](../primitive.array.html)T[; 24]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<T> Ord for [[](../primitive.array.html)T[; 8]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G, H, I, J> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K) -> Ret
impl<Ret, A, B, C, D, E, F> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, ...) -> Ret
impl<Ret, A, B, C> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, ...) -> Ret
impl<Ret, A> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A) -> Ret
impl Ord for [u32](../primitive.u32.html)
impl Ord for [char](../primitive.char.html)
impl<T> Ord for [[](../primitive.array.html)T[; 13]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl Ord for [str](../primitive.str.html)
impl<T> Ord for [[](../primitive.array.html)T[; 27]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<T> Ord for [[](../primitive.array.html)T[; 11]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D> Ord for unsafe [fn](../primitive.fn.html)(A, B, C, D) -> Ret
impl<A, B, C, D, E, F, G> Ord for [(](../primitive.tuple.html)A, B, C, D, E, F, G[)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), C: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), D: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), E: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), F: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), G: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<T> Ord for [*const T](../primitive.pointer.html) where T: ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<T> Ord for [Option](../../std/option/enum.Option.html "enum std::option::Option")<T> where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A> Ord for [fn](../primitive.fn.html)(A) -> Ret
impl Ord for [i8](../primitive.i8.html)
impl<Ret, A, B, C, D, E, F, G, H> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H) -> Ret
impl<Ret, A, B, C, D, E, F, G> Ord for [fn](../primitive.fn.html)(A, B, C, D, E, F, G) -> Ret
impl<A, B> Ord for [(](../primitive.tuple.html)A, B[)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<Ret, A> Ord for unsafe [fn](../primitive.fn.html)(A) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 23]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G, H, I> Ord for unsafe [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 32]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C> Ord for [fn](../primitive.fn.html)(A, B, C) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 14]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<T> Ord for [[](../primitive.array.html)T[; 2]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, ...) -> Ret
impl<Ret> Ord for [fn](../primitive.fn.html)() -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 5]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B> Ord for [fn](../primitive.fn.html)(A, B) -> Ret
impl<Ret, A, B> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, ...) -> Ret
impl Ord for [i16](../primitive.i16.html)
impl<T> Ord for [[](../primitive.array.html)T[; 16]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl Ord for [!](../primitive.never.html)
impl Ord for [isize](../primitive.isize.html)
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Ord for [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 22]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<A, B, C, D, E, F, G, H, I, J, K> Ord for [(](../primitive.tuple.html)A, B, C, D, E, F, G, H, I, J, K[)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), C: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), D: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), E: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), F: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), G: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), H: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), I: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), J: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), K: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Ord for [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
impl<T> Ord for [ManuallyDrop](../../std/mem/union.ManuallyDrop.html "union std::mem::ManuallyDrop")<T> where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, ...) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J> Ord for unsafe [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J) -> Ret
impl<A, B, C, D, E> Ord for [(](../primitive.tuple.html)A, B, C, D, E[)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), C: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), D: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), E: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<T> Ord for [[](../primitive.array.html)T[; 4]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B, C, D, E, F, G, H, I, J, K, L> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K, L) -> Ret
impl<Ret, A, B, C, D, E, F, G, H, I, J, K> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, J, K) -> Ret
impl<T, E> Ord for [Result](../../std/result/enum.Result.html "enum std::result::Result")<T, E> where E: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<T> Ord for [[](../primitive.array.html)T[; 18]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<Ret, A, B> Ord for extern "C" [fn](../primitive.fn.html)(A, B, ...) -> Ret
impl<Ret, A, B, C, D> Ord for [fn](../primitive.fn.html)(A, B, C, D) -> Ret
impl<Ret> Ord for unsafe extern "C" [fn](../primitive.fn.html)() -> Ret
impl<Ret, A, B, C, D> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D) -> Ret
impl<T> Ord for [[](../primitive.array.html)T[; 26]](../primitive.array.html) where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<A> Ord for [(](../primitive.tuple.html)A[,)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<'a, A> Ord for [&'a mut ](../primitive.reference.html)A where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<Ret, A, B, C, D, E> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, ...) -> Ret
impl<A, B, C, D, E, F, G, H, I> Ord for [(](../primitive.tuple.html)A, B, C, D, E, F, G, H, I[)](../primitive.tuple.html) where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), C: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), D: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), E: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), F: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), G: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), H: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), I: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<T> Ord for [PhantomData](../../std/marker/struct.PhantomData.html "struct std:๐:PhantomData")<T> where T: ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<Ret, A, B, C, D, E, F, G, H, I> Ord for unsafe extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F, G, H, I, ...) -> Ret
impl<Ret, A, B, C, D, E, F> Ord for extern "C" [fn](../primitive.fn.html)(A, B, C, D, E, F) -> Ret
impl<K, V> Ord for [BTreeMap](../../std/collections/btree%5Fmap/struct.BTreeMap.html "struct std::collections::btree_map::BTreeMap")<K, V> where K: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"), V: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<T> Ord for [Rc](../../std/rc/struct.Rc.html "struct std::rc::Rc")<T> where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<T> Ord for [Arc](../../std/sync/struct.Arc.html "struct std::sync::Arc")<T> where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<'a, B> Ord for [Cow](../../std/borrow/enum.Cow.html "enum std::borrow::Cow")<'a, B> where B: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + [ToOwned](../../std/borrow/trait.ToOwned.html "trait std::borrow::ToOwned") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<T> Ord for [LinkedList](../../std/collections/linked%5Flist/struct.LinkedList.html "struct std::collections::linked_list::LinkedList")<T> where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<T> Ord for [BTreeSet](../../std/collections/btree%5Fset/struct.BTreeSet.html "struct std::collections::btree_set::BTreeSet")<T> where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl<T> Ord for [Box](../../std/boxed/struct.Box.html "struct std::boxed::Box")<T> where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord") + ?[Sized](../../std/marker/trait.Sized.html "trait std:๐:Sized"),
impl<A> Ord for [VecDeque](../../std/collections/vec%5Fdeque/struct.VecDeque.html "struct std::collections::vec_deque::VecDeque")<A> where A: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl Ord for [String](../../std/string/struct.String.html "struct std:๐งต:String")
impl<T> Ord for [Vec](../../std/vec/struct.Vec.html "struct std::vec::Vec")<T> where T: [Ord](../../std/cmp/trait.Ord.html "trait std::cmp::Ord"),
impl Ord for [UnicodeVersion](../../std/char/struct.UnicodeVersion.html "struct std::char::UnicodeVersion")
impl Ord for [CString](../../std/ffi/struct.CString.html "struct std::ffi::CString")
impl Ord for [CStr](../../std/ffi/struct.CStr.html "struct std::ffi::CStr")
impl Ord for [OsString](../../std/ffi/struct.OsString.html "struct std::ffi::OsString")
impl Ord for [OsStr](../../std/ffi/struct.OsStr.html "struct std::ffi::OsStr")
impl Ord for [ErrorKind](../../std/io/enum.ErrorKind.html "enum std::io::ErrorKind")
impl Ord for [IpAddr](../../std/net/enum.IpAddr.html "enum std:๐ฅ :IpAddr")
impl Ord for [Ipv4Addr](../../std/net/struct.Ipv4Addr.html "struct std:๐ฅ :Ipv4Addr")
impl Ord for [Ipv6Addr](../../std/net/struct.Ipv6Addr.html "struct std:๐ฅ :Ipv6Addr")
impl<'a> Ord for [Prefix](../../std/path/enum.Prefix.html "enum std::path::Prefix")<'a>
impl<'a> Ord for [PrefixComponent](../../std/path/struct.PrefixComponent.html "struct std::path::PrefixComponent")<'a>
impl<'a> Ord for [Component](../../std/path/enum.Component.html "enum std::path::Component")<'a>
impl<'a> Ord for [Components](../../std/path/struct.Components.html "struct std::path::Components")<'a>
impl Ord for [PathBuf](../../std/path/struct.PathBuf.html "struct std::path::PathBuf")
impl Ord for [Path](../../std/path/struct.Path.html "struct std::path::Path")
impl Ord for [Instant](../../std/time/struct.Instant.html "struct std::time::Instant")
impl Ord for [SystemTime](../../std/time/struct.SystemTime.html "struct std::time::SystemTime")