pub trait OptionDivAssign<Rhs = Self, InnerRhs = Rhs> {
    fn opt_div_assign(&mut self, rhs: Rhs);
Expand description

Trait for values and Options division assignment.

Implementing this trait leads to the following auto-implementations:

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

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

Required Methods§

Performs the division assignment.

self is unchanged if rhs is None.


Most implementations will panic if rhs is zero.

Implementations on Foreign Types§