pub trait MinMax: Sized {
// Required methods
fn min(self, other: Self) -> Self;
fn max(self, other: Self) -> Self;
fn min_max(self, other: Self) -> (Self, Self);
}
Expand description
Methods for getting the largest or smallest of two values.
Required Methods§
sourcefn min_max(self, other: Self) -> (Self, Self)
fn min_max(self, other: Self) -> (Self, Self)
Return a pair of self
and other
, where the smallest is the first
value and the largest is the second.
Object Safety§
This trait is not object safe.