Skip to main content

PartialMinMax

Trait PartialMinMax 

Source
pub trait PartialMinMax: Sized {
    type T;

    // Required method
    fn partial_min_max(self) -> (Self::T, Self::T);

    // Provided methods
    fn partial_min(self) -> Self::T { ... }
    fn partial_max(self) -> Self::T { ... }
}
Expand description

Extension trait for getting minimum/maximum of values grouped together

Required Associated Types§

Source

type T

Type of a single value

Required Methods§

Source

fn partial_min_max(self) -> (Self::T, Self::T)

Find (min, max)

Provided Methods§

Source

fn partial_min(self) -> Self::T

Find min

Source

fn partial_max(self) -> Self::T

Find max

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: PartialOrd> PartialMinMax for (T, T)

Implementors§