Module lrs::cmp

Ordering comparisons

Description

This module provides structures and functions that operate on objects in a partial or total order.

Types

KindNameDescription
Trait Ord

Objects that are part of a total order.

Enum Ordering

Result of a comparison of two values.

Trait PartialOrd

Objects that implement the binary <, <=, >, and >= operators.

Functions

NameDescription
max

Calculates the maximum of two values.

max_mut

Calculates the maximum of two values by mutable reference.

max_ref

Calculates the maximum of two values by reference.

min

Calculates the minimum of two values.

min_mut

Calculates the minimum of two values by mutable reference.

min_ref

Calculates the minimum of two values by reference.