Trait gstreamer::prelude::OptionWrappingMul
pub trait OptionWrappingMul<Rhs = Self, InnerRhs = Rhs> {
type Output;
// Required method
fn opt_wrapping_mul(self, rhs: Rhs) -> Option<Self::Output>;
}
Expand description
Trait for values and Option
s wrapping multiplication.
Implementing this trait leads to the following auto-implementations:
OptionWrappingMul<Option<InnerRhs>>
forT
.OptionWrappingMul<Rhs>
forOption<T>
.OptionWrappingMul<Option<InnerRhs>>
forOption<T>
.- … and some variants with references.
Note that since the std
library doesn’t define any
WrappingMul
trait,
users must provide the base implementation for the inner type.
Required Associated Types§
type Output
type Output
The resulting inner type after applying the multiplication.
Required Methods§
fn opt_wrapping_mul(self, rhs: Rhs) -> Option<Self::Output>
fn opt_wrapping_mul(self, rhs: Rhs) -> Option<Self::Output>
Computes the multiplication wrapping at the numeric bounds instead of overflowing.
Returns None
if at least one argument is None
.