Enum fraction::GenericFraction [] [src]

pub enum GenericFraction<T> {
    Rational(Sign, Ratio<T>),
    Infinity(Sign),
    NaN,
}

Variants

Methods

impl<T: Clone + Integer> GenericFraction<T>
[src]

impl<T: Clone + Integer> GenericFraction<T>
[src]

Trait Implementations

impl<T: Debug> Debug for GenericFraction<T>
[src]

Formats the value using the given formatter.

impl<T: Hash> Hash for GenericFraction<T>
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl<T: Clone> Clone for GenericFraction<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Copy> Copy for GenericFraction<T>
[src]

impl<T: Bounded + Clone + Integer> Bounded for GenericFraction<T>
[src]

returns the smallest finite number this type can represent

returns the largest finite number this type can represent

impl<T: Clone + Integer> PartialEq for GenericFraction<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Clone + Integer> Eq for GenericFraction<T>
[src]

impl<T: Clone + Integer> PartialOrd for GenericFraction<T>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: Clone + Integer> Neg for GenericFraction<T>
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<T: Clone + Integer> Add for GenericFraction<T>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<T: Clone + Integer> AddAssign for GenericFraction<T>
[src]

The method for the += operator

impl<T: Clone + Integer> Sub for GenericFraction<T>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<T: Clone + Integer> SubAssign for GenericFraction<T>
[src]

The method for the -= operator

impl<T: Clone + Integer> Mul for GenericFraction<T>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<T: Clone + Integer> MulAssign for GenericFraction<T>
[src]

The method for the *= operator

impl<T: Clone + Integer> Div for GenericFraction<T>
[src]

The resulting type after applying the / operator

The method for the / operator

impl<T: Clone + Integer> DivAssign for GenericFraction<T>
[src]

The method for the /= operator

impl<T: Clone + Integer> Rem for GenericFraction<T>
[src]

The resulting type after applying the % operator

The method for the % operator

impl<T: Clone + Integer> RemAssign for GenericFraction<T>
[src]

The method for the %= operator

impl<T: Clone + Integer> Zero for GenericFraction<T>
[src]

Returns the additive identity element of Self, 0. Read more

Returns true if self is equal to the additive identity.

impl<T: Clone + Integer> One for GenericFraction<T>
[src]

Returns the multiplicative identity element of Self, 1. Read more

impl<T: Clone + Integer> Num for GenericFraction<T>
[src]

Convert from a string and radix <= 36.

impl<T: Clone + Integer> Signed for GenericFraction<T>
[src]

Computes the absolute value. Read more

The positive difference of two numbers. Read more

Returns the sign of the number. Read more

Returns true if the number is positive and false if the number is zero or negative.

Returns true if the number is negative and false if the number is zero or positive.

impl<T: Clone + Integer + PartialEq + ToPrimitive> ToPrimitive for GenericFraction<T>
[src]

Converts the value of self to an i64.

Converts the value of self to an u64.

Converts the value of self to an f64.

Converts the value of self to an isize.

Converts the value of self to an i8.

Converts the value of self to an i16.

Converts the value of self to an i32.

Converts the value of self to a usize.

Converts the value of self to an u8.

Converts the value of self to an u16.

Converts the value of self to an u32.

Converts the value of self to an f32.

impl<T: Display + Eq + One> Display for GenericFraction<T>
[src]

Formats the value using the given formatter.

impl<T: Clone + Integer> From<i8> for GenericFraction<T>
[src]

Performs the conversion.

impl<T: Clone + Integer> From<u8> for GenericFraction<T>
[src]

Performs the conversion.

impl<T: Clone + Integer> From<i16> for GenericFraction<T>
[src]

Performs the conversion.

impl<T: Clone + Integer> From<u16> for GenericFraction<T>
[src]

Performs the conversion.

impl<T: Clone + Integer> From<i32> for GenericFraction<T>
[src]

Performs the conversion.

impl<T: Clone + Integer> From<u32> for GenericFraction<T>
[src]

Performs the conversion.

impl<T: Clone + Integer> From<i64> for GenericFraction<T>
[src]

Performs the conversion.

impl<T: Clone + Integer> From<u64> for GenericFraction<T>
[src]

Performs the conversion.

impl<T: Clone + Integer> From<isize> for GenericFraction<T>
[src]

Performs the conversion.

impl<T: Clone + Integer> From<usize> for GenericFraction<T>
[src]

Performs the conversion.

impl<T: Clone + Integer + CheckedAdd + CheckedMul> From<f32> for GenericFraction<T>
[src]

Performs the conversion.

impl<T: Clone + Integer + CheckedAdd + CheckedMul> From<f64> for GenericFraction<T>
[src]

Performs the conversion.