Struct num_rational::Ratio [] [src]

pub struct Ratio<T> { /* fields omitted */ }

Represents the ratio between 2 numbers.

Methods

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

[src]

Creates a new Ratio. Fails if denom is zero.

[src]

Creates a Ratio representing the integer t.

[src]

Creates a Ratio without checking for denom == 0 or reducing.

[src]

Converts to an integer, rounding towards zero.

[src]

Gets an immutable reference to the numerator.

[src]

Gets an immutable reference to the denominator.

[src]

Returns true if the rational number is an integer (denominator is 1).

[src]

Returns a reduced copy of self.

In general, it is not necessary to use this method, as the only method of procuring a non-reduced fraction is through new_raw.

[src]

Returns the reciprocal.

Fails if the Ratio is zero.

[src]

Rounds towards minus infinity.

[src]

Rounds towards plus infinity.

[src]

Rounds to the nearest integer. Rounds half-way cases away from zero.

[src]

Rounds towards zero.

[src]

Returns the fractional part of a number, with division rounded towards zero.

Satisfies self == self.trunc() + self.fract().

impl<T: Clone + Integer + PrimInt> Ratio<T>
[src]

[src]

Raises the Ratio to the power of an exponent.

impl Ratio<BigInt>
[src]

[src]

Converts a float into a rational number.

impl<T: Integer + Signed + Bounded + NumCast + Clone> Ratio<T>
[src]

[src]

Trait Implementations

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

[src]

Performs the += operation.

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

[src]

Performs the /= operation.

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

[src]

Performs the *= operation.

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

[src]

Performs the %= operation.

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

[src]

Performs the -= operation.

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

[src]

Performs the += operation.

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

[src]

Performs the /= operation.

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

[src]

Performs the *= operation.

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

[src]

Performs the %= operation.

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

[src]

Performs the -= operation.

impl<'a, T: Clone + Integer + NumAssign> AddAssign<&'a Ratio<T>> for Ratio<T>
[src]

[src]

Performs the += operation.

impl<'a, T: Clone + Integer + NumAssign> AddAssign<&'a T> for Ratio<T>
[src]

[src]

Performs the += operation.

impl<'a, T: Clone + Integer + NumAssign> DivAssign<&'a Ratio<T>> for Ratio<T>
[src]

[src]

Performs the /= operation.

impl<'a, T: Clone + Integer + NumAssign> DivAssign<&'a T> for Ratio<T>
[src]

[src]

Performs the /= operation.

impl<'a, T: Clone + Integer + NumAssign> MulAssign<&'a Ratio<T>> for Ratio<T>
[src]

[src]

Performs the *= operation.

impl<'a, T: Clone + Integer + NumAssign> MulAssign<&'a T> for Ratio<T>
[src]

[src]

Performs the *= operation.

impl<'a, T: Clone + Integer + NumAssign> RemAssign<&'a Ratio<T>> for Ratio<T>
[src]

[src]

Performs the %= operation.

impl<'a, T: Clone + Integer + NumAssign> RemAssign<&'a T> for Ratio<T>
[src]

[src]

Performs the %= operation.

impl<'a, T: Clone + Integer + NumAssign> SubAssign<&'a Ratio<T>> for Ratio<T>
[src]

[src]

Performs the -= operation.

impl<'a, T: Clone + Integer + NumAssign> SubAssign<&'a T> for Ratio<T>
[src]

[src]

Performs the -= operation.

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

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

Formats the value using the given formatter. Read more

impl<T: Encodable> Encodable for Ratio<T>
[src]

[src]

Serialize a value using an Encoder.

impl<T: Decodable> Decodable for Ratio<T>
[src]

[src]

Deserialize a value using a Decoder.

impl<T> From<T> for Ratio<T> where
    T: Clone + Integer
[src]

[src]

Performs the conversion.

impl<T> From<(T, T)> for Ratio<T> where
    T: Clone + Integer
[src]

[src]

Performs the conversion.

impl<T: Clone + Integer> Ord for Ratio<T>
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

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

[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

1.0.0
[src]

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

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

[src]

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

1.0.0
[src]

This method tests for !=.

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

impl<T: Clone + Integer + Hash> Hash for Ratio<T>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a, 'b, T: Clone + Integer> Mul<&'b Ratio<T>> for &'a Ratio<T>
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, 'b, T: Clone + Integer> Mul<&'b T> for &'a Ratio<T>
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, T> Mul<Ratio<T>> for &'a Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, T> Mul<T> for &'a Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, T> Mul<&'a Ratio<T>> for Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, T> Mul<&'a T> for Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

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

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, 'b, T: Clone + Integer> Div<&'b Ratio<T>> for &'a Ratio<T>
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a, 'b, T: Clone + Integer> Div<&'b T> for &'a Ratio<T>
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a, T> Div<Ratio<T>> for &'a Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a, T> Div<T> for &'a Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a, T> Div<&'a Ratio<T>> for Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a, T> Div<&'a T> for Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

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

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a, 'b, T: Clone + Integer> Add<&'b Ratio<T>> for &'a Ratio<T>
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a, 'b, T: Clone + Integer> Add<&'b T> for &'a Ratio<T>
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a, T> Add<Ratio<T>> for &'a Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a, T> Add<T> for &'a Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a, T> Add<&'a Ratio<T>> for Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a, T> Add<&'a T> for Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a, 'b, T: Clone + Integer> Sub<&'b Ratio<T>> for &'a Ratio<T>
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a, 'b, T: Clone + Integer> Sub<&'b T> for &'a Ratio<T>
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a, T> Sub<Ratio<T>> for &'a Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a, T> Sub<T> for &'a Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a, T> Sub<&'a Ratio<T>> for Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a, T> Sub<&'a T> for Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

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

The resulting type after applying the - operator.

[src]

Performs the - operation.

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

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a, 'b, T: Clone + Integer> Rem<&'b Ratio<T>> for &'a Ratio<T>
[src]

The resulting type after applying the % operator.

[src]

Performs the % operation.

impl<'a, 'b, T: Clone + Integer> Rem<&'b T> for &'a Ratio<T>
[src]

The resulting type after applying the % operator.

[src]

Performs the % operation.

impl<'a, T> Rem<Ratio<T>> for &'a Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the % operator.

[src]

Performs the % operation.

impl<'a, T> Rem<T> for &'a Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the % operator.

[src]

Performs the % operation.

impl<'a, T> Rem<&'a Ratio<T>> for Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the % operator.

[src]

Performs the % operation.

impl<'a, T> Rem<&'a T> for Ratio<T> where
    T: Clone + Integer
[src]

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

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

The resulting type after applying the % operator.

[src]

Performs the % operation.

impl<T> CheckedMul for Ratio<T> where
    T: Clone + Integer + CheckedMul
[src]

[src]

Multiplies two numbers, checking for underflow or overflow. If underflow or overflow happens, None is returned. Read more

impl<T> CheckedDiv for Ratio<T> where
    T: Clone + Integer + CheckedMul
[src]

[src]

Divides two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned. Read more

impl<T: Clone + Integer + CheckedMul + CheckedAdd> CheckedAdd for Ratio<T>
[src]

[src]

Adds two numbers, checking for overflow. If overflow happens, None is returned. Read more

impl<T: Clone + Integer + CheckedMul + CheckedSub> CheckedSub for Ratio<T>
[src]

[src]

Subtracts two numbers, checking for underflow. If underflow happens, None is returned. Read more

impl<T> Neg for Ratio<T> where
    T: Clone + Integer + Neg<Output = T>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<'a, T> Neg for &'a Ratio<T> where
    T: Clone + Integer + Neg<Output = T>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

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

[src]

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

[src]

Returns true if self is equal to the additive identity.

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

[src]

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

[src]

Returns true if self is equal to the multiplicative identity. Read more

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

[src]

Parses numer/denom where the numbers are in base radix.

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

[src]

Computes the absolute value. Read more

[src]

The positive difference of two numbers. Read more

[src]

Returns the sign of the number. Read more

[src]

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

[src]

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

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

[src]

Renders as numer/denom. If denom=1, renders as numer.

impl<T: FromStr + Clone + Integer> FromStr for Ratio<T>
[src]

The associated error which can be returned from parsing.

[src]

Parses numer/denom or just numer.

impl<T> Into<(T, T)> for Ratio<T>
[src]

[src]

Performs the conversion.

impl FromPrimitive for Ratio<BigInt>
[src]

[src]

Convert an i64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an isize to return an optional value of this type. If the value cannot be represented by this value, then None is returned. Read more

[src]

Convert an i8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a usize to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

impl FromPrimitive for Ratio<i8>
[src]

[src]

Convert an i64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an isize to return an optional value of this type. If the value cannot be represented by this value, then None is returned. Read more

[src]

Convert an i8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a usize to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

impl FromPrimitive for Ratio<i16>
[src]

[src]

Convert an i64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an isize to return an optional value of this type. If the value cannot be represented by this value, then None is returned. Read more

[src]

Convert an i8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a usize to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

impl FromPrimitive for Ratio<i32>
[src]

[src]

Convert an i64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an isize to return an optional value of this type. If the value cannot be represented by this value, then None is returned. Read more

[src]

Convert an i8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a usize to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

impl FromPrimitive for Ratio<i64>
[src]

[src]

Convert an i64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an isize to return an optional value of this type. If the value cannot be represented by this value, then None is returned. Read more

[src]

Convert an i8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a usize to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

impl FromPrimitive for Ratio<isize>
[src]

[src]

Convert an i64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an isize to return an optional value of this type. If the value cannot be represented by this value, then None is returned. Read more

[src]

Convert an i8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a usize to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

impl FromPrimitive for Ratio<u8>
[src]

[src]

Convert an i64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an isize to return an optional value of this type. If the value cannot be represented by this value, then None is returned. Read more

[src]

Convert an i8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a usize to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

impl FromPrimitive for Ratio<u16>
[src]

[src]

Convert an i64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an isize to return an optional value of this type. If the value cannot be represented by this value, then None is returned. Read more

[src]

Convert an i8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a usize to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

impl FromPrimitive for Ratio<u32>
[src]

[src]

Convert an i64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an isize to return an optional value of this type. If the value cannot be represented by this value, then None is returned. Read more

[src]

Convert an i8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a usize to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

impl FromPrimitive for Ratio<u64>
[src]

[src]

Convert an i64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an isize to return an optional value of this type. If the value cannot be represented by this value, then None is returned. Read more

[src]

Convert an i8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a usize to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

impl FromPrimitive for Ratio<usize>
[src]

[src]

Convert an i64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a f64 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an isize to return an optional value of this type. If the value cannot be represented by this value, then None is returned. Read more

[src]

Convert an i8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an i32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert a usize to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u8 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u16 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more

[src]

Convert an u32 to return an optional value of this type. If the type cannot be represented by this value, then None is returned. Read more