Struct num_rug_adapter::Rational[][src]

pub struct Rational(_);

Implementations

impl Rational[src]

pub fn new() -> Self[src]

pub fn from_f64(v: f64) -> Option<Self>[src]

pub fn to_f64(&self) -> f64[src]

pub fn numer(&self) -> &Integer[src]

pub fn denom(&self) -> &Integer[src]

pub fn abs(self) -> Self[src]

pub fn abs_ref(&self) -> Self[src]

pub fn fract_floor_ref(&self) -> &Self[src]

Trait Implementations

impl Add<&'_ Rational> for Rational[src]

type Output = Rational

The resulting type after applying the + operator.

impl Add<Rational> for Rational[src]

type Output = Rational

The resulting type after applying the + operator.

impl Assign<&'_ Rational> for (&mut Rational, &mut Integer)[src]

impl Clone for Rational[src]

impl Debug for Rational[src]

impl Display for Rational[src]

impl Div<&'_ Rational> for &Rational[src]

type Output = Rational

The resulting type after applying the / operator.

impl Div<Rational> for Rational[src]

type Output = Rational

The resulting type after applying the / operator.

impl Eq for Rational[src]

impl From<&'_ Integer> for Rational[src]

impl From<&'_ Rational> for Rational[src]

impl From<Integer> for Rational[src]

impl From<isize> for Rational[src]

impl Hash for Rational[src]

impl Mul<&'_ Rational> for Rational[src]

type Output = Rational

The resulting type after applying the * operator.

impl Mul<Rational> for Rational[src]

type Output = Rational

The resulting type after applying the * operator.

impl Neg for Rational[src]

type Output = Rational

The resulting type after applying the - operator.

impl NegAssign for Rational[src]

impl Ord for Rational[src]

impl PartialEq<Rational> for Rational[src]

impl PartialEq<i32> for Rational[src]

impl PartialEq<i64> for Rational[src]

impl PartialEq<isize> for Rational[src]

impl PartialOrd<Rational> for Rational[src]

impl PartialOrd<i32> for Rational[src]

impl PartialOrd<i64> for Rational[src]

impl PartialOrd<isize> for Rational[src]

impl StructuralEq for Rational[src]

impl StructuralPartialEq for Rational[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> ToString for T where
    T: Display + ?Sized
[src]

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.