MinMax

Trait MinMax 

Source
pub trait MinMax {
    type Inner: PartialOrd;

    // Required method
    fn minmax(&mut self) -> Option<(Self::Inner, Self::Inner)>;
}

Required Associated Types§

Required Methods§

Source

fn minmax(&mut self) -> Option<(Self::Inner, Self::Inner)>

Simultaneously compute the min and max of items in an Iterator. Returns None if the iterator is empty.

Implementors§

Source§

impl<T> MinMax for T
where T: Iterator, T::Item: PartialOrd + Clone,

Source§

type Inner = <T as Iterator>::Item