doc.rust-lang.org
fn gt(&self, other: &Rhs) -> bool
Tests greater than (for self and other) and is used by the > operator.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
fn ge(&self, other: &Rhs) -> bool
Tests greater than or equal to (for self and other) and is used by the >= operator.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait PartialOrd<Rhs>
Trait for types that form a partial order.
trait
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
derive #[derive(PartialOrd)]
Derive macro generating an impl of the trait PartialOrd. The behavior of this macro is described in detail here.
derive_macro
core
Stable since 1.38.0
Version 1.100.0-nightly
doc.rust-lang.org
fn ne(&self, other: &Rhs) -> bool
Inequality operator !=.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
fn eq(&self, other: &Rhs) -> bool
Equality operator ==.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait PartialEq<Rhs>
Trait for comparisons using the equality operator.
trait
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
derive #[derive(PartialEq)]
Derive macro generating an impl of the trait PartialEq. The behavior of this macro is described in detail here.
derive_macro
core
Stable since 1.38.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn then_with<F>(self, f: F) -> Ordering
Chains the ordering with the given function.
method
core
Stable since 1.17.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn then(self, other: Ordering) -> Ordering
Chains two orderings.
method
core
Stable since 1.17.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn reverse(self) -> Ordering
Reverses the Ordering.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ne(self) -> bool
Returns true if the ordering is not the Equal variant.
method
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_lt(self) -> bool
Returns true if the ordering is the Less variant.
method
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_le(self) -> bool
Returns true if the ordering is either the Less or Equal variant.
method
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_gt(self) -> bool
Returns true if the ordering is the Greater variant.
method
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_ge(self) -> bool
Returns true if the ordering is either the Greater or Equal variant.
method
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_eq(self) -> bool
Returns true if the ordering is the Equal variant.
method
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub enum Ordering
An Ordering is the result of a comparison between two values.
enum
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values.
method
core
Stable since 1.21.0
Version 1.100.0-nightly
doc.rust-lang.org
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values.
method
core
Stable since 1.21.0
Version 1.100.0-nightly