pub struct Product<T>(pub T);
Expand description
Semigroup of the Product of type T if type T implements num_traits::Num.
let five = Product(5);
let ten = Product(10);
assert_eq!(Product(50), five.combine(ten));
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<T: Ord> Ord for Product<T>
impl<T: Ord> Ord for Product<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd<T> for Product<T>
impl<T: PartialOrd> PartialOrd<T> for Product<T>
Source§impl<T: PartialOrd> PartialOrd for Product<T>
impl<T: PartialOrd> PartialOrd for Product<T>
impl<T: Copy> Copy for Product<T>
impl<T: Eq> Eq for Product<T>
impl<T> StructuralPartialEq for Product<T>
Auto Trait Implementations§
impl<T> Freeze for Product<T>where
T: Freeze,
impl<T> RefUnwindSafe for Product<T>where
T: RefUnwindSafe,
impl<T> Send for Product<T>where
T: Send,
impl<T> Sync for Product<T>where
T: Sync,
impl<T> Unpin for Product<T>where
T: Unpin,
impl<T> UnwindSafe for Product<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