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 Options wrapping multiplication.

Implementing this trait leads to the following auto-implementations:

  • OptionWrappingMul<Option<InnerRhs>> for T.
  • OptionWrappingMul<Rhs> for Option<T>.
  • OptionWrappingMul<Option<InnerRhs>> for Option<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

The resulting inner type after applying the multiplication.

Required Methods§

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.

Implementations on Foreign Types§

§

impl OptionWrappingMul for i8

§

impl OptionWrappingMul for i16

§

impl OptionWrappingMul for i32

§

impl OptionWrappingMul for i64

§

impl OptionWrappingMul for i128

§

impl OptionWrappingMul for u8

§

impl OptionWrappingMul for u16

§

impl OptionWrappingMul for u32

§

impl OptionWrappingMul for u64

§

impl OptionWrappingMul for u128

source§

impl OptionWrappingMul<Buffers> for u64

source§

impl OptionWrappingMul<Bytes> for u64

source§

impl OptionWrappingMul<ClockTime> for u64

source§

impl OptionWrappingMul<Default> for u64

source§

impl OptionWrappingMul<Other> for u64

source§

impl OptionWrappingMul<Percent> for u32

§

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

§

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

§

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

§

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

§

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

§

fn opt_wrapping_mul( self, rhs: Option<InnerRhs>, ) -> Option<<Option<T> as OptionWrappingMul<Option<InnerRhs>, InnerRhs>>::Output>

§

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

§

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

§

fn opt_wrapping_mul( self, rhs: Rhs, ) -> Option<<Option<T> as OptionWrappingMul<Rhs>>::Output>

Implementors§

source§

impl OptionWrappingMul<u32> for Percent

source§

impl OptionWrappingMul<u64> for Buffers

source§

impl OptionWrappingMul<u64> for Bytes

source§

impl OptionWrappingMul<u64> for ClockTime

source§

impl OptionWrappingMul<u64> for Default

source§

impl OptionWrappingMul<u64> for Other

§

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

§

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

§

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

§

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