pub struct Max<T: Ord>(pub T);
Expand description
Wrapper type for types that are ordered and can have a Max combination
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Ord + Ord> Ord for Max<T>
impl<T: Ord + Ord> Ord for Max<T>
source§impl<T: PartialEq + Ord> PartialEq for Max<T>
impl<T: PartialEq + Ord> PartialEq for Max<T>
source§impl<T: PartialOrd + Ord> PartialOrd for Max<T>
impl<T: PartialOrd + Ord> PartialOrd for Max<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy + Ord> Copy for Max<T>
impl<T: Eq + Ord> Eq for Max<T>
impl<T: Ord> StructuralEq for Max<T>
impl<T: Ord> StructuralPartialEq for Max<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Max<T>where T: RefUnwindSafe,
impl<T> Send for Max<T>where T: Send,
impl<T> Sync for Max<T>where T: Sync,
impl<T> Unpin for Max<T>where T: Unpin,
impl<T> UnwindSafe for Max<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