Trait gstreamer::prelude::OptionWrappingRem

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§

type Output

The resulting inner type after applying the remainder.

Required Methods§

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§

§

impl OptionWrappingRem for i8

§

impl OptionWrappingRem for i16

§

impl OptionWrappingRem for i32

§

impl OptionWrappingRem for i64

§

impl OptionWrappingRem for i128

§

impl OptionWrappingRem for u8

§

impl OptionWrappingRem for u16

§

impl OptionWrappingRem for u32

§

impl OptionWrappingRem for u64

§

impl OptionWrappingRem for u128

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

Implementors§

§

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

§

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

§

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

§

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