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

Trait for values and Options substraction assignment.

Implementing this trait leads to the following auto-implementations:

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

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

Required Methods§

Performs the substraction assignment.

self is unchanged if rhs is None.

Implementations on Foreign Types§