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 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
fn eq(&self, other: &Rhs) -> bool
Equality operator ==.
method
core
Stable since 1.0.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
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
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
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
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 le(&self, other: &Rhs) -> bool
Tests less 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
fn lt(&self, other: &Rhs) -> bool
Tests less 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 partial_cmp(&self, other: &Rhs) -> Option<Ordering>
This method returns an ordering between self and other values if one exists.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Reverse<T>
A helper struct for reverse ordering.
struct
core
Stable since 1.19.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn max<T>(v1: T, v2: T) -> T
Compares and returns the maximum of two values.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn max_by<T, F>(v1: T, v2: T, compare: F) -> T
Returns the maximum of two values with respect to the specified comparison function.
function
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn max_by_key<T, F, K>(v1: T, v2: T, f: F) -> T
Returns the element that gives the maximum value from the specified function.
function
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn min<T>(v1: T, v2: T) -> T
Compares and returns the minimum of two values.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn min_by<T, F>(v1: T, v2: T, compare: F) -> T
Returns the minimum of two values with respect to the specified comparison function.
function
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn min_by_key<T, F, K>(v1: T, v2: T, f: F) -> T
Returns the element that gives the minimum value from the specified function.
function
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro column!
Expands to the column number at which it was invoked.
macro
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro compile_error!
Causes compilation to fail with the given error message when encountered.
macro
core
Stable since 1.20.0
Version 1.100.0-nightly