[][src]Enum tune::ratio::RatioExpressionVariant

pub enum RatioExpressionVariant {
    Float {
        float_value: f64,
    },
    Fraction {
        numer: f64,
        denom: f64,
    },
    IntervalFraction {
        numer: f64,
        denom: f64,
        interval: f64,
    },
    Cents {
        cents_value: f64,
    },
}

Type used to distinguish which particular outer expression was given as string input bevor parsing.

Variants

Float

Fields of Float

float_value: f64
Fraction

Fields of Fraction

numer: f64denom: f64
IntervalFraction

Fields of IntervalFraction

numer: f64denom: f64interval: f64
Cents

Fields of Cents

cents_value: f64

Implementations

impl RatioExpressionVariant[src]

pub fn as_ratio(self) -> Result<Ratio, String>[src]

Trait Implementations

impl Clone for RatioExpressionVariant[src]

impl Copy for RatioExpressionVariant[src]

impl Debug for RatioExpressionVariant[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.