impl_mul_methods

Macro impl_mul_methods 

Source
macro_rules! impl_mul_methods {
    ($type:ty $(, ($type_param:ty, $param_name:ty))?) => { ... };
}
Expand description

Given a struct which implements Mul implement MulAssign<T> for any type T which implements Into<Self>.

MulAssign is implemented in a simple way by calling mul and assigning the result to *self. Similarly Product is implemented in the similarly simple way of just doing a reduce on the iterator.