Trait gstreamer::prelude::OptionSaturatingMul

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

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

Trait for values and Options saturating multiplication.

Implementing this trait leads to the following auto-implementations:

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

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

Computes the multiplication saturating at the numeric bounds instead of overflowing.

Returns None if at least one argument is None.

Implementations on Foreign Types§

§

impl OptionSaturatingMul for i8

§

impl OptionSaturatingMul for i16

§

impl OptionSaturatingMul for i32

§

impl OptionSaturatingMul for i64

§

impl OptionSaturatingMul for i128

§

impl OptionSaturatingMul for u8

§

impl OptionSaturatingMul for u16

§

impl OptionSaturatingMul for u32

§

impl OptionSaturatingMul for u64

§

impl OptionSaturatingMul for u128

source§

impl OptionSaturatingMul<Signed<Buffers>> for i64

source§

impl OptionSaturatingMul<Signed<Buffers>> for u64

source§

impl OptionSaturatingMul<Signed<Bytes>> for i64

source§

impl OptionSaturatingMul<Signed<Bytes>> for u64

source§

impl OptionSaturatingMul<Signed<ClockTime>> for i64

source§

impl OptionSaturatingMul<Signed<ClockTime>> for u64

source§

impl OptionSaturatingMul<Signed<Default>> for i64

source§

impl OptionSaturatingMul<Signed<Default>> for u64

source§

impl OptionSaturatingMul<Signed<Other>> for i64

source§

impl OptionSaturatingMul<Signed<Other>> for u64

source§

impl OptionSaturatingMul<Signed<Percent>> for i32

source§

impl OptionSaturatingMul<Signed<Percent>> for u32

§

impl OptionSaturatingMul<u32> for Duration

source§

impl OptionSaturatingMul<Buffers> for u64

source§

impl OptionSaturatingMul<Bytes> for u64

source§

impl OptionSaturatingMul<ClockTime> for u64

source§

impl OptionSaturatingMul<Default> for u64

source§

impl OptionSaturatingMul<Other> for u64

source§

impl OptionSaturatingMul<Percent> for u32

§

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

§

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

§

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

§

impl<T, InnerRhs> OptionSaturatingMul<Option<InnerRhs>, InnerRhs> for Option<T>

§

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

§

fn opt_saturating_mul( self, rhs: Option<InnerRhs>, ) -> Option<<Option<T> as OptionSaturatingMul<Option<InnerRhs>, InnerRhs>>::Output>

§

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

§

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

§

fn opt_saturating_mul( self, rhs: Rhs, ) -> Option<<Option<T> as OptionSaturatingMul<Rhs>>::Output>

Implementors§

source§

impl OptionSaturatingMul<i32> for Signed<u32>

source§

impl OptionSaturatingMul<i32> for Signed<Percent>

source§

impl OptionSaturatingMul<i64> for Signed<u64>

source§

impl OptionSaturatingMul<i64> for Signed<Buffers>

source§

impl OptionSaturatingMul<i64> for Signed<Bytes>

source§

impl OptionSaturatingMul<i64> for Signed<ClockTime>

source§

impl OptionSaturatingMul<i64> for Signed<Default>

source§

impl OptionSaturatingMul<i64> for Signed<Other>

source§

impl OptionSaturatingMul<isize> for Signed<usize>

source§

impl OptionSaturatingMul<u32> for Signed<u32>

source§

impl OptionSaturatingMul<u32> for Signed<Percent>

source§

impl OptionSaturatingMul<u32> for Percent

source§

impl OptionSaturatingMul<u64> for Signed<u64>

source§

impl OptionSaturatingMul<u64> for Signed<Buffers>

source§

impl OptionSaturatingMul<u64> for Signed<Bytes>

source§

impl OptionSaturatingMul<u64> for Signed<ClockTime>

source§

impl OptionSaturatingMul<u64> for Signed<Default>

source§

impl OptionSaturatingMul<u64> for Signed<Other>

source§

impl OptionSaturatingMul<u64> for Buffers

source§

impl OptionSaturatingMul<u64> for Bytes

source§

impl OptionSaturatingMul<u64> for ClockTime

source§

impl OptionSaturatingMul<u64> for Default

source§

impl OptionSaturatingMul<u64> for Other

source§

impl OptionSaturatingMul<usize> for Signed<usize>

§

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

§

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

§

impl<T, InnerRhs> OptionSaturatingMul<Option<InnerRhs>, InnerRhs> for T

§

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