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

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

Trait for values and Options remainder.

Implementing this trait leads to the following auto-implementations:

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

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

Required Associated Types§

The resulting inner type after applying the remainder.

Required Methods§

Computes the remainder.

Returns None if at least one argument is None.


Most implementations will panic if rhs is zero.

Implementations on Foreign Types§