Trait gstreamer::prelude::OptionSaturatingMul

source ·
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§

source

type Output

The resulting inner type after applying the multiplication.

Required Methods§

source

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§

source§

impl OptionSaturatingMul for i8

source§

impl OptionSaturatingMul for i16

source§

impl OptionSaturatingMul for i32

source§

impl OptionSaturatingMul for i64

source§

impl OptionSaturatingMul for i128

source§

impl OptionSaturatingMul for u8

source§

impl OptionSaturatingMul for u16

source§

impl OptionSaturatingMul for u32

source§

impl OptionSaturatingMul for u64

source§

impl OptionSaturatingMul for u128

source§

impl OptionSaturatingMul<Signed<ClockTime>> for i64

source§

impl OptionSaturatingMul<Signed<ClockTime>> for u64

source§

impl OptionSaturatingMul<Signed<Other>> for i64

source§

impl OptionSaturatingMul<Signed<Other>> for u64

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<Default>> for i64

source§

impl OptionSaturatingMul<Signed<Default>> for u64

source§

impl OptionSaturatingMul<Signed<Percent>> for i32

source§

impl OptionSaturatingMul<Signed<Percent>> for u32

source§

impl OptionSaturatingMul<u32> for Duration

source§

impl OptionSaturatingMul<ClockTime> for u64

source§

impl OptionSaturatingMul<Other> for u64

source§

impl OptionSaturatingMul<Buffers> for u64

source§

impl OptionSaturatingMul<Bytes> for u64

source§

impl OptionSaturatingMul<Default> for u64

source§

impl OptionSaturatingMul<Percent> for u32

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

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<ClockTime>

source§

impl OptionSaturatingMul<i64> for Signed<Other>

source§

impl OptionSaturatingMul<i64> for Signed<Buffers>

source§

impl OptionSaturatingMul<i64> for Signed<Bytes>

source§

impl OptionSaturatingMul<i64> for Signed<Default>

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<ClockTime>

source§

impl OptionSaturatingMul<u64> for Signed<Other>

source§

impl OptionSaturatingMul<u64> for Signed<Buffers>

source§

impl OptionSaturatingMul<u64> for Signed<Bytes>

source§

impl OptionSaturatingMul<u64> for Signed<Default>

source§

impl OptionSaturatingMul<u64> for ClockTime

source§

impl OptionSaturatingMul<u64> for Other

source§

impl OptionSaturatingMul<u64> for Buffers

source§

impl OptionSaturatingMul<u64> for Bytes

source§

impl OptionSaturatingMul<u64> for Default

source§

impl OptionSaturatingMul<usize> for Signed<usize>

source§

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

source§

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

source§

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

source§

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