Trait gstreamer::prelude::OptionWrappingRem

source ·
pub trait OptionWrappingRem<Rhs = Self, InnerRhs = Rhs> {
    type Output;

    // Required method
    fn opt_wrapping_rem(self, rhs: Rhs) -> Option<Self::Output>;
}
Expand description

Trait for values and Options wrapping remainder.

Implementing this trait leads to the following auto-implementations:

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

Note that since the std library doesn’t define any WrappingRem trait, users must provide the base implementation for the inner type.

Required Associated Types§

source

type Output

The resulting inner type after applying the remainder.

Required Methods§

source

fn opt_wrapping_rem(self, rhs: Rhs) -> Option<Self::Output>

Computes the remainder wrapping at the numeric bounds instead of overflowing.

Returns None if at least one argument is None.

§Panics

Most implementations will panic if rhs is zero.

Implementations on Foreign Types§

source§

impl OptionWrappingRem for i8

source§

impl OptionWrappingRem for i16

source§

impl OptionWrappingRem for i32

source§

impl OptionWrappingRem for i64

source§

impl OptionWrappingRem for i128

source§

impl OptionWrappingRem for u8

source§

impl OptionWrappingRem for u16

source§

impl OptionWrappingRem for u32

source§

impl OptionWrappingRem for u64

source§

impl OptionWrappingRem for u128

source§

impl<T, InnerRhs> OptionWrappingRem<&Option<InnerRhs>, InnerRhs> for Option<T>
where T: OptionOperations + OptionWrappingRem<InnerRhs>, InnerRhs: Copy,

source§

type Output = <T as OptionWrappingRem<InnerRhs>>::Output

source§

fn opt_wrapping_rem( self, rhs: &Option<InnerRhs>, ) -> Option<<Option<T> as OptionWrappingRem<&Option<InnerRhs>, InnerRhs>>::Output>

source§

impl<T, InnerRhs> OptionWrappingRem<Option<InnerRhs>, InnerRhs> for Option<T>
where T: OptionOperations + OptionWrappingRem<InnerRhs>,

source§

type Output = <T as OptionWrappingRem<InnerRhs>>::Output

source§

fn opt_wrapping_rem( self, rhs: Option<InnerRhs>, ) -> Option<<Option<T> as OptionWrappingRem<Option<InnerRhs>, InnerRhs>>::Output>

source§

impl<T, Rhs> OptionWrappingRem<Rhs> for Option<T>

source§

type Output = <T as OptionWrappingRem<Rhs>>::Output

source§

fn opt_wrapping_rem( self, rhs: Rhs, ) -> Option<<Option<T> as OptionWrappingRem<Rhs>>::Output>

Implementors§

source§

impl<T, InnerRhs> OptionWrappingRem<&Option<InnerRhs>, InnerRhs> for T
where T: OptionOperations + OptionWrappingRem<InnerRhs>, InnerRhs: Copy,

source§

type Output = <T as OptionWrappingRem<InnerRhs>>::Output

source§

impl<T, InnerRhs> OptionWrappingRem<Option<InnerRhs>, InnerRhs> for T
where T: OptionOperations + OptionWrappingRem<InnerRhs>,

source§

type Output = <T as OptionWrappingRem<InnerRhs>>::Output