Trait gstreamer::prelude::OptionOverflowingRem
source · pub trait OptionOverflowingRem<Rhs = Self, InnerRhs = Rhs> {
type Output;
// Required method
fn opt_overflowing_rem(self, rhs: Rhs) -> Option<(Self::Output, bool)>;
}
Expand description
Trait for values and Option
s overflowing remainder.
Implementing this trait leads to the following auto-implementations:
OptionOverflowingRem<Option<InnerRhs>>
forT
.OptionOverflowingRem<Rhs>
forOption<T>
.OptionOverflowingRem<Option<InnerRhs>>
forOption<T>
.- … and some variants with references.
Note that since the std
library doesn’t define any
OverflowingRem
trait,
users must provide the base implementation for the inner type.
Required Associated Types§
Required Methods§
sourcefn opt_overflowing_rem(self, rhs: Rhs) -> Option<(Self::Output, bool)>
fn opt_overflowing_rem(self, rhs: Rhs) -> Option<(Self::Output, bool)>
Returns a tuple of the remainder
along with a boolean indicating whether an arithmetic overflow
would occur. If an overflow would have occurred then self
is returned.
Returns None
if at least one argument is None
.
§Panics
Most implementations will panic if rhs
is zero.