Trait gstreamer::prelude::OptionSub

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

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

Trait for values and Options substraction.

Implementing this trait leads to the following auto-implementations:

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

This trait is auto-implemented for OptionOperations types implementing Sub<Rhs>.

Required Associated Types§

type Output

The resulting inner type after applying the substraction.

Required Methods§

fn opt_sub(self, rhs: Rhs) -> Option<Self::Output>

Computes the substraction.

Returns None if at least one argument is None.

Implementations on Foreign Types§

§

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

§

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

§

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

§

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

§

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

§

fn opt_sub( self, rhs: Option<InnerRhs>, ) -> Option<<Option<T> as OptionSub<Option<InnerRhs>, InnerRhs>>::Output>

§

impl<T, Rhs> OptionSub<Rhs> for Option<T>
where T: OptionOperations + OptionSub<Rhs>,

§

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

§

fn opt_sub(self, rhs: Rhs) -> Option<<Option<T> as OptionSub<Rhs>>::Output>

Implementors§

§

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

§

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

§

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

§

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

§

impl<T, Rhs> OptionSub<Rhs> for T
where T: OptionOperations + Sub<Rhs>,

§

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