Struct num_rational::Ratio[][src]

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

Represents the ratio between two numbers.

Implementations

impl<T> Ratio<T>[src]

These method are const for Rust 1.31 and later.

pub const fn new_raw(numer: T, denom: T) -> Ratio<T>[src]

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

There are several methods that will panic if used on a Ratio with denom == 0.

pub const fn numer(&self) -> &T[src]

Gets an immutable reference to the numerator.

pub const fn denom(&self) -> &T[src]

Gets an immutable reference to the denominator.

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

pub fn new(numer: T, denom: T) -> Ratio<T>[src]

Creates a new Ratio.

Panics if denom is zero.

pub fn from_integer(t: T) -> Ratio<T>[src]

Creates a Ratio representing the integer t.

pub fn to_integer(&self) -> T[src]

Converts to an integer, rounding towards zero.

pub fn is_integer(&self) -> bool[src]

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

pub fn reduced(&self) -> Ratio<T>[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.

Panics if denom is zero.

pub fn recip(&self) -> Ratio<T>[src]

Returns the reciprocal.

Panics if the Ratio is zero.

pub fn floor(&self) -> Ratio<T>[src]

Rounds towards minus infinity.

pub fn ceil(&self) -> Ratio<T>[src]

Rounds towards plus infinity.

pub fn round(&self) -> Ratio<T>[src]

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

pub fn trunc(&self) -> Ratio<T>[src]

Rounds towards zero.

pub fn fract(&self) -> Ratio<T>[src]

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

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

pub fn pow(&self, expon: i32) -> Ratio<T> where
    &'a T: Pow<u32, Output = T>, 
[src]

Raises the Ratio to the power of an exponent.

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

Trait Implementations

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

type Output = Ratio<T>

The resulting type after applying the + operator.

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

type Output = Ratio<T>

The resulting type after applying the + operator.

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

type Output = Ratio<T>

The resulting type after applying the + operator.

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

type Output = Ratio<T>

The resulting type after applying the + operator.

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

type Output = Ratio<T>

The resulting type after applying the + operator.

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

type Output = Ratio<T>

The resulting type after applying the + operator.

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

type Output = Ratio<T>

The resulting type after applying the + operator.

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

type Output = Ratio<T>

The resulting type after applying the + operator.

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

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

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

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

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

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

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

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

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

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

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

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

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

type Output = Ratio<T>

The resulting type after applying the / operator.

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

type Output = Ratio<T>

The resulting type after applying the / operator.

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

type Output = Ratio<T>

The resulting type after applying the / operator.

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

type Output = Ratio<T>

The resulting type after applying the / operator.

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

type Output = Ratio<T>

The resulting type after applying the / operator.

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

type Output = Ratio<T>

The resulting type after applying the / operator.

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

type Output = Ratio<T>

The resulting type after applying the / operator.

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

type Output = Ratio<T>

The resulting type after applying the / operator.

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

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

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

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

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

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

impl FromPrimitive for Ratio<i8>[src]

impl FromPrimitive for Ratio<i16>[src]

impl FromPrimitive for Ratio<u128>[src]

impl FromPrimitive for Ratio<usize>[src]

impl FromPrimitive for Ratio<i32>[src]

impl FromPrimitive for Ratio<i64>[src]

impl FromPrimitive for Ratio<i128>[src]

impl FromPrimitive for Ratio<isize>[src]

impl FromPrimitive for Ratio<u8>[src]

impl FromPrimitive for Ratio<u16>[src]

impl FromPrimitive for Ratio<u32>[src]

impl FromPrimitive for Ratio<u64>[src]

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

type Err = ParseRatioError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Ratio<T>, ParseRatioError>[src]

Parses numer/denom or just numer.

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

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

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

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

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

type Output = Ratio<T>

The resulting type after applying the * operator.

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

type Output = Ratio<T>

The resulting type after applying the * operator.

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

type Output = Ratio<T>

The resulting type after applying the * operator.

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

type Output = Ratio<T>

The resulting type after applying the * operator.

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

type Output = Ratio<T>

The resulting type after applying the * operator.

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

type Output = Ratio<T>

The resulting type after applying the * operator.

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

type Output = Ratio<T>

The resulting type after applying the * operator.

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

type Output = Ratio<T>

The resulting type after applying the * operator.

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

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

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

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

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

type Output = Ratio<T>

The resulting type after applying the - operator.

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

type Output = Ratio<T>

The resulting type after applying the - operator.

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

type FromStrRadixErr = ParseRatioError

fn from_str_radix(s: &str, radix: u32) -> Result<Ratio<T>, ParseRatioError>[src]

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

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

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

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

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

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

impl<'b, T: Clone + Integer + Pow<u128, Output = T>> Pow<&'b i128> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<'b, T: Clone + Integer + Pow<u16, Output = T>> Pow<&'b i16> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<'b, T: Clone + Integer + Pow<u32, Output = T>> Pow<&'b i32> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<'b, T: Clone + Integer + Pow<u64, Output = T>> Pow<&'b i64> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<'b, T: Clone + Integer + Pow<u8, Output = T>> Pow<&'b i8> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<'b, T: Clone + Integer + Pow<usize, Output = T>> Pow<&'b isize> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<'b, T: Clone + Integer + Pow<u128, Output = T>> Pow<&'b u128> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<'b, T: Clone + Integer + Pow<u16, Output = T>> Pow<&'b u16> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<'b, T: Clone + Integer + Pow<u32, Output = T>> Pow<&'b u32> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<'b, T: Clone + Integer + Pow<u64, Output = T>> Pow<&'b u64> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<'b, T: Clone + Integer + Pow<u8, Output = T>> Pow<&'b u8> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<'b, T: Clone + Integer + Pow<usize, Output = T>> Pow<&'b usize> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<T: Clone + Integer + Pow<u128, Output = T>> Pow<i128> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<T: Clone + Integer + Pow<u16, Output = T>> Pow<i16> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<T: Clone + Integer + Pow<u32, Output = T>> Pow<i32> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<T: Clone + Integer + Pow<u64, Output = T>> Pow<i64> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<T: Clone + Integer + Pow<u8, Output = T>> Pow<i8> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

impl<T: Clone + Integer + Pow<usize, Output = T>> Pow<isize> for Ratio<T>[src]

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

type Output = Ratio<T>

The result after applying the operator.

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

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

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

type Output = Ratio<T>

The resulting type after applying the % operator.

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

type Output = Ratio<T>

The resulting type after applying the % operator.

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

type Output = Ratio<T>

The resulting type after applying the % operator.

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

type Output = Ratio<T>

The resulting type after applying the % operator.

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

type Output = Ratio<T>

The resulting type after applying the % operator.

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

type Output = Ratio<T>

The resulting type after applying the % operator.

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

type Output = Ratio<T>

The resulting type after applying the % operator.

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

type Output = Ratio<T>

The resulting type after applying the % operator.

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

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

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

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

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

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

type Output = Ratio<T>

The resulting type after applying the - operator.

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

type Output = Ratio<T>

The resulting type after applying the - operator.

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

type Output = Ratio<T>

The resulting type after applying the - operator.

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

type Output = Ratio<T>

The resulting type after applying the - operator.

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

type Output = Ratio<T>

The resulting type after applying the - operator.

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

type Output = Ratio<T>

The resulting type after applying the - operator.

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

type Output = Ratio<T>

The resulting type after applying the - operator.

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

type Output = Ratio<T>

The resulting type after applying the - operator.

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

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

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

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

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

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

impl ToPrimitive for Ratio<u8>[src]

impl ToPrimitive for Ratio<i8>[src]

impl ToPrimitive for Ratio<u16>[src]

impl ToPrimitive for Ratio<i16>[src]

impl ToPrimitive for Ratio<u32>[src]

impl ToPrimitive for Ratio<i32>[src]

impl ToPrimitive for Ratio<u64>[src]

impl ToPrimitive for Ratio<i64>[src]

impl ToPrimitive for Ratio<usize>[src]

impl ToPrimitive for Ratio<isize>[src]

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

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

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

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

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

Auto Trait Implementations

impl<T> RefUnwindSafe for Ratio<T> where
    T: RefUnwindSafe

impl<T> Send for Ratio<T> where
    T: Send

impl<T> Sync for Ratio<T> where
    T: Sync

impl<T> Unpin for Ratio<T> where
    T: Unpin

impl<T> UnwindSafe for Ratio<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> NumAssign for T where
    T: Num + NumAssignOps<T>, 
[src]

impl<T, Rhs> NumAssignOps<Rhs> for T where
    T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, 
[src]

impl<T> NumAssignRef for T where
    T: NumAssign + for<'r> NumAssignOps<&'r T>, 
[src]

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]

impl<T> NumRef for T where
    T: Num + for<'r> NumOps<&'r T, T>, 
[src]

impl<T, Base> RefNum<Base> for T where
    T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>, 
[src]