Struct sp_arithmetic::rational::RationalInfinite[][src]

pub struct RationalInfinite(_, _);

A wrapper for any rational number with infinitely large numerator and denominator.

This type exists to facilitate cmp operation on values like a/b < c/d where a, b, c, d are all BigUint.


impl RationalInfinite[src]

pub fn n(&self) -> &BigUint[src]

Return the numerator reference.

pub fn d(&self) -> &BigUint[src]

Return the denominator reference.

pub fn from(n: BigUint, d: BigUint) -> Self[src]

Build from a raw n/d.

pub fn zero() -> Self[src]


pub fn one() -> Self[src]


Trait Implementations

impl Clone for RationalInfinite[src]

impl Default for RationalInfinite[src]

impl Eq for RationalInfinite[src]

impl From<Rational128> for RationalInfinite[src]

impl Ord for RationalInfinite[src]

impl PartialEq<RationalInfinite> for RationalInfinite[src]

impl PartialOrd<RationalInfinite> for RationalInfinite[src]

impl StructuralEq for RationalInfinite[src]

Auto Trait Implementations

impl RefUnwindSafe for RationalInfinite

impl Send for RationalInfinite

impl Sync for RationalInfinite

impl Unpin for RationalInfinite

impl UnwindSafe for RationalInfinite

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> SaturatedConversion for T[src]

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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.

impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>,