pub trait OptionMul<Rhs = Self, InnerRhs = Rhs> {
    type Output;

    fn opt_mul(self, rhs: Rhs) -> Option<Self::Output>;
}
Expand description

Trait for values and Options multiplication.

Implementing this trait leads to the following auto-implementations:

  • OptionMul<Option<InnerRhs>> for T.
  • OptionMul<Rhs> for Option<T>.
  • OptionMul<Option<InnerRhs>> for Option<T>.
  • … and some variants with references.

This trait is auto-implemented for OptionOperations types implementing Mul<Rhs>.

Required Associated Types

The resulting inner type after applying the multiplication.

Required Methods

Computes the multiplication.

Returns None if at least one argument is None.

Implementations on Foreign Types

Implementors