Struct sp_arithmetic::rational::RationalInfinite
source · pub struct RationalInfinite(_, _);
Expand description
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
.
Implementations§
Trait Implementations§
source§impl Clone for RationalInfinite
impl Clone for RationalInfinite
source§fn clone(&self) -> RationalInfinite
fn clone(&self) -> RationalInfinite
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for RationalInfinite
impl Default for RationalInfinite
source§fn default() -> RationalInfinite
fn default() -> RationalInfinite
Returns the “default value” for a type. Read more
source§impl From<Rational128> for RationalInfinite
impl From<Rational128> for RationalInfinite
source§fn from(t: Rational128) -> Self
fn from(t: Rational128) -> Self
Converts to this type from the input type.
source§impl Ord for RationalInfinite
impl Ord for RationalInfinite
source§impl PartialEq<RationalInfinite> for RationalInfinite
impl PartialEq<RationalInfinite> for RationalInfinite
source§impl PartialOrd<RationalInfinite> for RationalInfinite
impl PartialOrd<RationalInfinite> for RationalInfinite
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for RationalInfinite
impl StructuralEq for RationalInfinite
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§
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read moresource§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.