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
sourceimpl Clone for RationalInfinite
impl Clone for RationalInfinite
sourcefn clone(&self) -> RationalInfinite
fn clone(&self) -> RationalInfinite
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for RationalInfinite
impl Default for RationalInfinite
sourcefn default() -> RationalInfinite
fn default() -> RationalInfinite
Returns the “default value” for a type. Read more
sourceimpl From<Rational128> for RationalInfinite
impl From<Rational128> for RationalInfinite
sourcefn from(t: Rational128) -> Self
fn from(t: Rational128) -> Self
Performs the conversion.
sourceimpl Ord for RationalInfinite
impl Ord for RationalInfinite
sourceimpl PartialEq<RationalInfinite> for RationalInfinite
impl PartialEq<RationalInfinite> for RationalInfinite
sourceimpl PartialOrd<RationalInfinite> for RationalInfinite
impl PartialOrd<RationalInfinite> for RationalInfinite
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
sourcefn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Convert from a value of T
into an equivalent instance of Self
. Read more
sourcefn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of T
. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
sourcefn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of T
.