pub trait OptionAdd<Rhs = Self, InnerRhs = Rhs> {
type Output;
// Required method
fn opt_add(self, rhs: Rhs) -> Option<Self::Output>;
}
Expand description
Trait for values and Option
s addition.
Implementing this trait leads to the following auto-implementations:
OptionAdd<Option<InnerRhs>>
forT
.OptionAdd<Rhs>
forOption<T>
.OptionAdd<Option<InnerRhs>>
forOption<T>
.- … and some variants with references.
This trait is auto-implemented for OptionOperations
types implementing
Add<Rhs>
.
Required Associated Types§
type Output
type Output
The resulting inner type after applying the addition.