pub struct Min<T>(pub T);
Expand description
Semigroup over the Minimum of T if T implements std::cmp::Ord.
assert_eq!(Min(5), Min(10).combine(Min(5)));
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<T: Ord> Ord for Min<T>
impl<T: Ord> Ord for Min<T>
Source§impl<T: PartialOrd> PartialOrd<T> for Min<T>
impl<T: PartialOrd> PartialOrd<T> for Min<T>
Source§impl<T: PartialOrd> PartialOrd for Min<T>
impl<T: PartialOrd> PartialOrd for Min<T>
impl<T: Copy> Copy for Min<T>
impl<T: Eq> Eq for Min<T>
impl<T> StructuralPartialEq for Min<T>
Auto Trait Implementations§
impl<T> Freeze for Min<T>where
T: Freeze,
impl<T> RefUnwindSafe for Min<T>where
T: RefUnwindSafe,
impl<T> Send for Min<T>where
T: Send,
impl<T> Sync for Min<T>where
T: Sync,
impl<T> Unpin for Min<T>where
T: Unpin,
impl<T> UnwindSafe for Min<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more