Trait gstreamer::prelude::OptionCheckedRem

pub trait OptionCheckedRem<Rhs = Self, InnerRhs = Rhs> {
    type Output;

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

Trait for values and Options checked remainder.

Implementing this trait leads to the following auto-implementations:

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

Note that since the std library doesn’t define any CheckedRem 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_checked_rem(self, rhs: Rhs) -> Result<Option<Self::Output>, Error>

Computes the checked remainder.

  • Returns Ok(Some(result)) if result could be computed.
  • Returns Ok(None) if at least one argument is None.
  • Returns Err(Error::Overflow) if an overflow occured.
  • Returns Err(Error::DivisionByZero) if rhs is zero.

Implementations on Foreign Types§

§

impl OptionCheckedRem for i8

§

type Output = i8

§

fn opt_checked_rem( self, rhs: i8, ) -> Result<Option<<i8 as OptionCheckedRem>::Output>, Error>

§

impl OptionCheckedRem for i16

§

type Output = i16

§

fn opt_checked_rem( self, rhs: i16, ) -> Result<Option<<i16 as OptionCheckedRem>::Output>, Error>

§

impl OptionCheckedRem for i32

§

type Output = i32

§

fn opt_checked_rem( self, rhs: i32, ) -> Result<Option<<i32 as OptionCheckedRem>::Output>, Error>

§

impl OptionCheckedRem for i64

§

type Output = i64

§

fn opt_checked_rem( self, rhs: i64, ) -> Result<Option<<i64 as OptionCheckedRem>::Output>, Error>

§

impl OptionCheckedRem for i128

§

type Output = i128

§

fn opt_checked_rem( self, rhs: i128, ) -> Result<Option<<i128 as OptionCheckedRem>::Output>, Error>

§

impl OptionCheckedRem for u8

§

type Output = u8

§

fn opt_checked_rem( self, rhs: u8, ) -> Result<Option<<u8 as OptionCheckedRem>::Output>, Error>

§

impl OptionCheckedRem for u16

§

type Output = u16

§

fn opt_checked_rem( self, rhs: u16, ) -> Result<Option<<u16 as OptionCheckedRem>::Output>, Error>

§

impl OptionCheckedRem for u32

§

type Output = u32

§

fn opt_checked_rem( self, rhs: u32, ) -> Result<Option<<u32 as OptionCheckedRem>::Output>, Error>

§

impl OptionCheckedRem for u64

§

type Output = u64

§

fn opt_checked_rem( self, rhs: u64, ) -> Result<Option<<u64 as OptionCheckedRem>::Output>, Error>

§

impl OptionCheckedRem for u128

§

type Output = u128

§

fn opt_checked_rem( self, rhs: u128, ) -> Result<Option<<u128 as OptionCheckedRem>::Output>, Error>

§

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

§

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

§

fn opt_checked_rem( self, rhs: &Option<InnerRhs>, ) -> Result<Option<<Option<T> as OptionCheckedRem<&Option<InnerRhs>, InnerRhs>>::Output>, Error>

§

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

§

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

§

fn opt_checked_rem( self, rhs: Option<InnerRhs>, ) -> Result<Option<<Option<T> as OptionCheckedRem<Option<InnerRhs>, InnerRhs>>::Output>, Error>

§

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

§

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

§

fn opt_checked_rem( self, rhs: Rhs, ) -> Result<Option<<Option<T> as OptionCheckedRem<Rhs>>::Output>, Error>

Implementors§

source§

impl OptionCheckedRem for Signed<u32>

source§

impl OptionCheckedRem for Signed<u64>

source§

impl OptionCheckedRem for Signed<usize>

source§

impl OptionCheckedRem for Signed<Buffers>

source§

impl OptionCheckedRem for Signed<Bytes>

source§

impl OptionCheckedRem for Signed<ClockTime>

source§

impl OptionCheckedRem for Signed<Default>

source§

impl OptionCheckedRem for Signed<Other>

source§

impl OptionCheckedRem for Signed<Percent>

source§

impl OptionCheckedRem for Buffers

source§

impl OptionCheckedRem for Bytes

source§

impl OptionCheckedRem for ClockTime

source§

impl OptionCheckedRem for Default

source§

impl OptionCheckedRem for Other

source§

impl OptionCheckedRem for Percent

source§

impl OptionCheckedRem<i32> for Signed<u32>

source§

impl OptionCheckedRem<i32> for Signed<Percent>

source§

impl OptionCheckedRem<i64> for Signed<u64>

source§

impl OptionCheckedRem<i64> for Signed<Buffers>

source§

impl OptionCheckedRem<i64> for Signed<Bytes>

source§

impl OptionCheckedRem<i64> for Signed<ClockTime>

source§

impl OptionCheckedRem<i64> for Signed<Default>

source§

impl OptionCheckedRem<i64> for Signed<Other>

source§

impl OptionCheckedRem<isize> for Signed<usize>

source§

impl OptionCheckedRem<u32> for Signed<u32>

source§

impl OptionCheckedRem<u32> for Signed<Percent>

source§

impl OptionCheckedRem<u32> for Percent

source§

impl OptionCheckedRem<u64> for Signed<u64>

source§

impl OptionCheckedRem<u64> for Signed<Buffers>

source§

impl OptionCheckedRem<u64> for Signed<Bytes>

source§

impl OptionCheckedRem<u64> for Signed<ClockTime>

source§

impl OptionCheckedRem<u64> for Signed<Default>

source§

impl OptionCheckedRem<u64> for Signed<Other>

source§

impl OptionCheckedRem<u64> for Buffers

source§

impl OptionCheckedRem<u64> for Bytes

source§

impl OptionCheckedRem<u64> for ClockTime

source§

impl OptionCheckedRem<u64> for Default

source§

impl OptionCheckedRem<u64> for Other

source§

impl OptionCheckedRem<usize> for Signed<usize>

§

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

§

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

§

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

§

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