Trait option_operations::min_max::OptionMinMax
source · pub trait OptionMinMax<Other, Inner = Other> {
// Required methods
fn opt_min(self, other: Other) -> Option<Inner>;
fn opt_max(self, other: Other) -> Option<Inner>;
}
Expand description
Trait for values and Option
s that can be compared
to get the minimum or maximum.
Implementing this type leads to the following auto-implementations:
OptionMinMax<Option<InnerRhs>> for T
.OptionMinMax<Rhs> for Option<T>
.OptionMinMax<Option<InnerRhs>> for Option<T>
.- … and some variants with references.
This trait is auto-implemented for OptionOperations
types
implementing OptionOrd<Rhs>
.