[][src]Struct y4m::Ratio

pub struct Ratio {
    pub num: usize,
    pub den: usize,

Simple ratio structure since stdlib lacks one.


num: usize


den: usize



impl Ratio[src]

pub fn new(num: usize, den: usize) -> Ratio[src]

Create a new ratio.

pub fn parse(value: &[u8]) -> Result<Ratio, Error>[src]

Parse a ratio from a byte slice.

Trait Implementations

impl Clone for Ratio[src]

impl Copy for Ratio[src]

impl Debug for Ratio[src]

impl Display for Ratio[src]

Auto Trait Implementations

impl RefUnwindSafe for Ratio

impl Send for Ratio

impl Sync for Ratio

impl Unpin for Ratio

impl UnwindSafe for Ratio

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.