Struct gstreamer::Fraction [−][src]
pub struct Fraction(pub Rational32);
Methods
impl Fraction
[src]
impl Fraction
pub fn new(num: i32, den: i32) -> Fraction
[src]
pub fn new(num: i32, den: i32) -> Fraction
pub 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 Fraction
impl Clone for Fraction
[src]
impl Clone for Fraction
fn clone(&self) -> Fraction
[src]
fn clone(&self) -> Fraction
Returns 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 Fraction
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Ord for Fraction
[src]
impl Ord for Fraction
fn cmp(&self, other: &Fraction) -> Ordering
[src]
fn cmp(&self, other: &Fraction) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for Fraction
[src]
impl PartialOrd for Fraction
fn 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) -> bool
This 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) -> bool
This 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) -> bool
This 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) -> bool
This 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 Fraction
impl PartialEq for Fraction
[src]
impl PartialEq for Fraction
fn eq(&self, other: &Fraction) -> bool
[src]
fn eq(&self, other: &Fraction) -> bool
This 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) -> bool
This method tests for !=
.
impl Hash for Fraction
[src]
impl Hash for Fraction
fn 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 Fraction
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Deref for Fraction
[src]
impl Deref for Fraction
type Target = Rational32
The resulting type after dereferencing.
fn deref(&self) -> &Rational32
[src]
fn deref(&self) -> &Rational32
Dereferences the value.
impl DerefMut for Fraction
[src]
impl DerefMut for Fraction
fn deref_mut(&mut self) -> &mut Rational32
[src]
fn deref_mut(&mut self) -> &mut Rational32
Mutably dereferences the value.
impl AsRef<Rational32> for Fraction
[src]
impl AsRef<Rational32> for Fraction
fn as_ref(&self) -> &Rational32
[src]
fn as_ref(&self) -> &Rational32
Performs the conversion.
impl Mul<Fraction> for Fraction
[src]
impl Mul<Fraction> for Fraction
type Output = Fraction
The resulting type after applying the *
operator.
fn mul(self, other: Fraction) -> Fraction
[src]
fn mul(self, other: Fraction) -> Fraction
Performs the *
operation.
impl Mul<i32> for Fraction
[src]
impl Mul<i32> for Fraction
type Output = Fraction
The resulting type after applying the *
operator.
fn mul(self, other: i32) -> Fraction
[src]
fn mul(self, other: i32) -> Fraction
Performs the *
operation.
impl Div<Fraction> for Fraction
[src]
impl Div<Fraction> for Fraction
type Output = Fraction
The resulting type after applying the /
operator.
fn div(self, other: Fraction) -> Fraction
[src]
fn div(self, other: Fraction) -> Fraction
Performs the /
operation.
impl Div<i32> for Fraction
[src]
impl Div<i32> for Fraction
type Output = Fraction
The resulting type after applying the /
operator.
fn div(self, other: i32) -> Fraction
[src]
fn div(self, other: i32) -> Fraction
Performs the /
operation.
impl Add<Fraction> for Fraction
[src]
impl Add<Fraction> for Fraction
type Output = Fraction
The resulting type after applying the +
operator.
fn add(self, other: Fraction) -> Fraction
[src]
fn add(self, other: Fraction) -> Fraction
Performs the +
operation.
impl Add<i32> for Fraction
[src]
impl Add<i32> for Fraction
type Output = Fraction
The resulting type after applying the +
operator.
fn add(self, other: i32) -> Fraction
[src]
fn add(self, other: i32) -> Fraction
Performs the +
operation.
impl Sub<Fraction> for Fraction
[src]
impl Sub<Fraction> for Fraction
type Output = Fraction
The resulting type after applying the -
operator.
fn sub(self, other: Fraction) -> Fraction
[src]
fn sub(self, other: Fraction) -> Fraction
Performs the -
operation.
impl Sub<i32> for Fraction
[src]
impl Sub<i32> for Fraction
type Output = Fraction
The resulting type after applying the -
operator.
fn sub(self, other: i32) -> Fraction
[src]
fn sub(self, other: i32) -> Fraction
Performs the -
operation.
impl Rem<Fraction> for Fraction
[src]
impl Rem<Fraction> for Fraction
type Output = Fraction
The resulting type after applying the %
operator.
fn rem(self, other: Fraction) -> Fraction
[src]
fn rem(self, other: Fraction) -> Fraction
Performs the %
operation.
impl Rem<i32> for Fraction
[src]
impl Rem<i32> for Fraction
type Output = Fraction
The resulting type after applying the %
operator.
fn rem(self, other: i32) -> Fraction
[src]
fn rem(self, other: i32) -> Fraction
Performs the %
operation.
impl Neg for Fraction
[src]
impl Neg for Fraction
type Output = Fraction
The resulting type after applying the -
operator.
fn neg(self) -> Fraction
[src]
fn neg(self) -> Fraction
Performs the unary -
operation.
impl From<i32> for Fraction
[src]
impl From<i32> for Fraction
impl From<(i32, i32)> for Fraction
[src]
impl From<(i32, i32)> for Fraction
impl Into<(i32, i32)> for Fraction
[src]
impl Into<(i32, i32)> for Fraction
impl From<Rational32> for Fraction
[src]
impl From<Rational32> for Fraction
fn from(x: Rational32) -> Fraction
[src]
fn from(x: Rational32) -> Fraction
Performs the conversion.
impl From<Fraction> for Rational32
[src]
impl From<Fraction> for Rational32
fn from(x: Fraction) -> Rational32
[src]
fn from(x: Fraction) -> Rational32
Performs the conversion.
impl StaticType for Fraction
[src]
impl StaticType for Fraction
fn static_type() -> Type
[src]
fn static_type() -> Type
Returns the type identifier of Self
.
impl<'a> FromValue<'a> for Fraction
[src]
impl<'a> FromValue<'a> for Fraction
unsafe fn from_value(v: &'a Value) -> Fraction
[src]
unsafe fn from_value(v: &'a Value) -> Fraction
impl<'a> FromValueOptional<'a> for Fraction
[src]
impl<'a> FromValueOptional<'a> for Fraction
unsafe 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