Trait Option MinMax
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 Options 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>.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".