Struct gstreamer::Fraction [−][src]
pub struct Fraction(pub Rational32);
Methods
impl Fraction[src]
impl Fractionpub fn new(num: i32, den: i32) -> Fraction[src]
pub fn new(num: i32, den: i32) -> Fractionpub fn approximate_f32(x: f32) -> Option<Fraction>[src]
pub fn approximate_f32(x: f32) -> Option<Fraction>pub fn approximate_f64(x: f64) -> Option<Fraction>[src]
pub fn approximate_f64(x: f64) -> Option<Fraction>Trait Implementations
impl Copy for Fraction[src]
impl Copy for Fractionimpl Clone for Fraction[src]
impl Clone for Fractionfn clone(&self) -> Fraction[src]
fn clone(&self) -> FractionReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for Fraction[src]
impl Debug for Fractionfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Ord for Fraction[src]
impl Ord for Fractionfn cmp(&self, other: &Fraction) -> Ordering[src]
fn cmp(&self, other: &Fraction) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl PartialOrd for Fraction[src]
impl PartialOrd for Fractionfn partial_cmp(&self, other: &Fraction) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Fraction) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Fraction) -> bool[src]
fn lt(&self, other: &Fraction) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Fraction) -> bool[src]
fn le(&self, other: &Fraction) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Fraction) -> bool[src]
fn gt(&self, other: &Fraction) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Fraction) -> bool[src]
fn ge(&self, other: &Fraction) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Eq for Fraction[src]
impl Eq for Fractionimpl PartialEq for Fraction[src]
impl PartialEq for Fractionfn eq(&self, other: &Fraction) -> bool[src]
fn eq(&self, other: &Fraction) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Fraction) -> bool[src]
fn ne(&self, other: &Fraction) -> boolThis method tests for !=.
impl Hash for Fraction[src]
impl Hash for Fractionfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Display for Fraction[src]
impl Display for Fractionfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Deref for Fraction[src]
impl Deref for Fractiontype Target = Rational32
The resulting type after dereferencing.
fn deref(&self) -> &Rational32[src]
fn deref(&self) -> &Rational32Dereferences the value.
impl DerefMut for Fraction[src]
impl DerefMut for Fractionfn deref_mut(&mut self) -> &mut Rational32[src]
fn deref_mut(&mut self) -> &mut Rational32Mutably dereferences the value.
impl AsRef<Rational32> for Fraction[src]
impl AsRef<Rational32> for Fractionfn as_ref(&self) -> &Rational32[src]
fn as_ref(&self) -> &Rational32Performs the conversion.
impl Mul<Fraction> for Fraction[src]
impl Mul<Fraction> for Fractiontype Output = Fraction
The resulting type after applying the * operator.
fn mul(self, other: Fraction) -> Fraction[src]
fn mul(self, other: Fraction) -> FractionPerforms the * operation.
impl Mul<i32> for Fraction[src]
impl Mul<i32> for Fractiontype Output = Fraction
The resulting type after applying the * operator.
fn mul(self, other: i32) -> Fraction[src]
fn mul(self, other: i32) -> FractionPerforms the * operation.
impl Div<Fraction> for Fraction[src]
impl Div<Fraction> for Fractiontype Output = Fraction
The resulting type after applying the / operator.
fn div(self, other: Fraction) -> Fraction[src]
fn div(self, other: Fraction) -> FractionPerforms the / operation.
impl Div<i32> for Fraction[src]
impl Div<i32> for Fractiontype Output = Fraction
The resulting type after applying the / operator.
fn div(self, other: i32) -> Fraction[src]
fn div(self, other: i32) -> FractionPerforms the / operation.
impl Add<Fraction> for Fraction[src]
impl Add<Fraction> for Fractiontype Output = Fraction
The resulting type after applying the + operator.
fn add(self, other: Fraction) -> Fraction[src]
fn add(self, other: Fraction) -> FractionPerforms the + operation.
impl Add<i32> for Fraction[src]
impl Add<i32> for Fractiontype Output = Fraction
The resulting type after applying the + operator.
fn add(self, other: i32) -> Fraction[src]
fn add(self, other: i32) -> FractionPerforms the + operation.
impl Sub<Fraction> for Fraction[src]
impl Sub<Fraction> for Fractiontype Output = Fraction
The resulting type after applying the - operator.
fn sub(self, other: Fraction) -> Fraction[src]
fn sub(self, other: Fraction) -> FractionPerforms the - operation.
impl Sub<i32> for Fraction[src]
impl Sub<i32> for Fractiontype Output = Fraction
The resulting type after applying the - operator.
fn sub(self, other: i32) -> Fraction[src]
fn sub(self, other: i32) -> FractionPerforms the - operation.
impl Rem<Fraction> for Fraction[src]
impl Rem<Fraction> for Fractiontype Output = Fraction
The resulting type after applying the % operator.
fn rem(self, other: Fraction) -> Fraction[src]
fn rem(self, other: Fraction) -> FractionPerforms the % operation.
impl Rem<i32> for Fraction[src]
impl Rem<i32> for Fractiontype Output = Fraction
The resulting type after applying the % operator.
fn rem(self, other: i32) -> Fraction[src]
fn rem(self, other: i32) -> FractionPerforms the % operation.
impl Neg for Fraction[src]
impl Neg for Fractiontype Output = Fraction
The resulting type after applying the - operator.
fn neg(self) -> Fraction[src]
fn neg(self) -> FractionPerforms the unary - operation.
impl From<i32> for Fraction[src]
impl From<i32> for Fractionimpl From<(i32, i32)> for Fraction[src]
impl From<(i32, i32)> for Fractionimpl Into<(i32, i32)> for Fraction[src]
impl Into<(i32, i32)> for Fractionimpl From<Rational32> for Fraction[src]
impl From<Rational32> for Fractionfn from(x: Rational32) -> Fraction[src]
fn from(x: Rational32) -> FractionPerforms the conversion.
impl From<Fraction> for Rational32[src]
impl From<Fraction> for Rational32fn from(x: Fraction) -> Rational32[src]
fn from(x: Fraction) -> Rational32Performs the conversion.
impl StaticType for Fraction[src]
impl StaticType for Fractionfn static_type() -> Type[src]
fn static_type() -> TypeReturns the type identifier of Self.
impl<'a> FromValue<'a> for Fraction[src]
impl<'a> FromValue<'a> for Fractionunsafe fn from_value(v: &'a Value) -> Fraction[src]
unsafe fn from_value(v: &'a Value) -> Fractionimpl<'a> FromValueOptional<'a> for Fraction[src]
impl<'a> FromValueOptional<'a> for Fractionunsafe fn from_value_optional(v: &'a Value) -> Option<Fraction>[src]
unsafe fn from_value_optional(v: &'a Value) -> Option<Fraction>impl SetValue for Fraction[src]
impl SetValue for Fraction