Ratio

Struct Ratio 

Source
pub struct Ratio<T> { /* private fields */ }
Expand description

Represents the ratio between two numbers.

Implementations§

Source§

impl<T> Ratio<T>

These method are const.

Source

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

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.

Source

pub fn into_raw(self) -> (T, T)

Deconstructs a Ratio into its numerator and denominator.

Source

pub const fn numer(&self) -> &T

Gets an immutable reference to the numerator.

Source

pub const fn denom(&self) -> &T

Gets an immutable reference to the denominator.

Source§

impl<T> Ratio<T>
where T: Clone + Integer,

Source

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

Creates a new Ratio.

Panics if denom is zero.

Source

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

Creates a Ratio representing the integer t.

Source

pub fn to_integer(&self) -> T

Converts to an integer, rounding towards zero.

Source

pub fn is_integer(&self) -> bool

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

Source

pub fn reduced(&self) -> Ratio<T>

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.

Source

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

Returns the reciprocal.

Panics if the Ratio is zero.

Source

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

Rounds towards minus infinity.

Source

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

Rounds towards plus infinity.

Source

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

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

Source

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

Rounds towards zero.

Source

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

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

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

Source

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

Raises the Ratio to the power of an exponent.

Source§

impl Ratio<BigInt>

Source

pub fn from_float<T>(f: T) -> Option<Ratio<BigInt>>
where T: FloatCore,

Converts a float into a rational number.

Source§

impl<T> Ratio<T>
where T: ConstZero + ConstOne,

Source

pub const ZERO: Ratio<T>

A constant Ratio 0/1.

Source§

impl<T> Ratio<T>
where T: ConstOne,

Source

pub const ONE: Ratio<T>

A constant Ratio 1/1.

Source§

impl<T> Ratio<T>
where T: Integer + Signed + Bounded + NumCast + Clone,

Source

pub fn approximate_float<F>(f: F) -> Option<Ratio<T>>
where F: FloatCore + NumCast,

Source§

impl<T> Ratio<T>

Trait Implementations§

Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'b Ratio<T>) -> Ratio<T>

Performs the + operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the + operator.
Source§

fn add(self, other: &Ratio<T>) -> Ratio<T>

Performs the + operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'b T) -> Ratio<T>

Performs the + operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the + operator.
Source§

fn add(self, other: &T) -> Ratio<T>

Performs the + operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the + operator.
Source§

fn add(self, other: Ratio<T>) -> Ratio<T>

Performs the + operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the + operator.
Source§

fn add(self, other: T) -> Ratio<T>

Performs the + operation. Read more
Source§

impl<T> Add<T> for Ratio<T>
where T: Clone + Integer,

Source§

type Output = Ratio<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Ratio<T>

Performs the + operation. Read more
Source§

impl<T> Add for Ratio<T>
where T: Clone + Integer,

Source§

type Output = Ratio<T>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Ratio<T>) -> Ratio<T>

Performs the + operation. Read more
Source§

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

Source§

fn add_assign(&mut self, other: &Ratio<T>)

Performs the += operation. Read more
Source§

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

Source§

fn add_assign(&mut self, other: &T)

Performs the += operation. Read more
Source§

impl<T> AddAssign<T> for Ratio<T>
where T: Clone + Integer + NumAssign,

Source§

fn add_assign(&mut self, other: T)

Performs the += operation. Read more
Source§

impl<T> AddAssign for Ratio<T>
where T: Clone + Integer + NumAssign,

Source§

fn add_assign(&mut self, other: Ratio<T>)

Performs the += operation. Read more
Source§

impl<T> Binary for Ratio<T>
where T: Binary + Clone + Integer,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T> CheckedAdd for Ratio<T>

Source§

fn checked_add(&self, rhs: &Ratio<T>) -> Option<Ratio<T>>

Adds two numbers, checking for overflow. If overflow happens, None is returned.
Source§

impl<T> CheckedDiv for Ratio<T>
where T: Clone + Integer + CheckedMul,

Source§

fn checked_div(&self, rhs: &Ratio<T>) -> Option<Ratio<T>>

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

impl<T> CheckedMul for Ratio<T>
where T: Clone + Integer + CheckedMul,

Source§

fn checked_mul(&self, rhs: &Ratio<T>) -> Option<Ratio<T>>

Multiplies two numbers, checking for underflow or overflow. If underflow or overflow happens, None is returned.
Source§

impl<T> CheckedSub for Ratio<T>

Source§

fn checked_sub(&self, rhs: &Ratio<T>) -> Option<Ratio<T>>

Subtracts two numbers, checking for underflow. If underflow happens, None is returned.
Source§

impl<T> Clone for Ratio<T>
where T: Clone,

Source§

fn clone(&self) -> Ratio<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> ConstOne for Ratio<T>
where T: Clone + Integer + ConstOne,

Source§

const ONE: Ratio<T> = Self::ONE

The multiplicative identity element of Self, 1.
Source§

impl<T> ConstZero for Ratio<T>

Source§

const ZERO: Ratio<T> = Self::ZERO

The additive identity element of Self, 0.
Source§

impl ConversionFactor<usize> for Ratio<usize>

Source§

fn powi(self, e: i32) -> Ratio<usize>

Raises a ConversionFactor<V> to an integer power.
Source§

fn value(self) -> usize

Converts a ConversionFactor<V> into its underlying storage type.
Source§

impl<T> Debug for Ratio<T>
where T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T> Default for Ratio<T>
where T: Clone + Integer,

Source§

fn default() -> Ratio<T>

Returns zero

Source§

impl<'de, T> Deserialize<'de> for Ratio<T>
where T: Deserialize<'de> + Clone + Integer + PartialOrd,

Available on crate feature serde only.
Source§

fn deserialize<D>( deserializer: D, ) -> Result<Ratio<T>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T> Display for Ratio<T>
where T: Display + Clone + Integer,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b Ratio<T>) -> Ratio<T>

Performs the / operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the / operator.
Source§

fn div(self, other: &Ratio<T>) -> Ratio<T>

Performs the / operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b T) -> Ratio<T>

Performs the / operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the / operator.
Source§

fn div(self, other: &T) -> Ratio<T>

Performs the / operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the / operator.
Source§

fn div(self, other: Ratio<T>) -> Ratio<T>

Performs the / operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the / operator.
Source§

fn div(self, other: T) -> Ratio<T>

Performs the / operation. Read more
Source§

impl<T> Div<T> for Ratio<T>
where T: Clone + Integer,

Source§

type Output = Ratio<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Ratio<T>

Performs the / operation. Read more
Source§

impl<T> Div for Ratio<T>
where T: Clone + Integer,

Source§

type Output = Ratio<T>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Ratio<T>) -> Ratio<T>

Performs the / operation. Read more
Source§

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

Source§

fn div_assign(&mut self, other: &Ratio<T>)

Performs the /= operation. Read more
Source§

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

Source§

fn div_assign(&mut self, other: &T)

Performs the /= operation. Read more
Source§

impl<T> DivAssign<T> for Ratio<T>
where T: Clone + Integer + NumAssign,

Source§

fn div_assign(&mut self, other: T)

Performs the /= operation. Read more
Source§

impl<T> DivAssign for Ratio<T>
where T: Clone + Integer + NumAssign,

Source§

fn div_assign(&mut self, other: Ratio<T>)

Performs the /= operation. Read more
Source§

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

Source§

fn from(pair: (T, T)) -> Ratio<T>

Converts to this type from the input type.
Source§

impl<T> From<Ratio<T>> for (T, T)

Source§

fn from(val: Ratio<T>) -> (T, T)

Converts to this type from the input type.
Source§

impl<T> From<T> for Ratio<T>
where T: Clone + Integer,

Source§

fn from(x: T) -> Ratio<T>

Converts to this type from the input type.
Source§

impl FromPrimitive for Ratio<BigInt>

Available on crate feature num-bigint only.
Source§

fn from_i64(n: i64) -> Option<Ratio<BigInt>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<BigInt>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<BigInt>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<BigInt>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<BigInt>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<BigInt>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<i128>

Source§

fn from_i64(n: i64) -> Option<Ratio<i128>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<i128>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<i128>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<i128>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<i128>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<i128>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<i16>

Source§

fn from_i64(n: i64) -> Option<Ratio<i16>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<i16>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<i16>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<i16>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<i16>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<i16>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<i32>

Source§

fn from_i64(n: i64) -> Option<Ratio<i32>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<i32>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<i32>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<i32>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<i32>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<i32>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<i64>

Source§

fn from_i64(n: i64) -> Option<Ratio<i64>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<i64>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<i64>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<i64>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<i64>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<i64>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<i8>

Source§

fn from_i64(n: i64) -> Option<Ratio<i8>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<i8>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<i8>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<i8>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<i8>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<i8>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<isize>

Source§

fn from_i64(n: i64) -> Option<Ratio<isize>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<isize>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<isize>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<isize>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<isize>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<isize>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<u128>

Source§

fn from_i64(n: i64) -> Option<Ratio<u128>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<u128>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<u128>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<u128>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<u128>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<u128>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<u16>

Source§

fn from_i64(n: i64) -> Option<Ratio<u16>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<u16>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<u16>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<u16>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<u16>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<u16>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<u32>

Source§

fn from_i64(n: i64) -> Option<Ratio<u32>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<u32>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<u32>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<u32>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<u32>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<u32>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<u64>

Source§

fn from_i64(n: i64) -> Option<Ratio<u64>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<u64>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<u64>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<u64>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<u64>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<u64>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<u8>

Source§

fn from_i64(n: i64) -> Option<Ratio<u8>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<u8>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<u8>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<u8>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<u8>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<u8>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl FromPrimitive for Ratio<usize>

Source§

fn from_i64(n: i64) -> Option<Ratio<usize>>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Ratio<usize>>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_u64(n: u64) -> Option<Ratio<usize>>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Ratio<usize>>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Ratio<usize>>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Ratio<usize>>

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

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

impl<T> FromStr for Ratio<T>
where T: FromStr + Clone + Integer,

Source§

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

Parses numer/denom or just numer.

Source§

type Err = ParseRatioError

The associated error which can be returned from parsing.
Source§

impl<T> Hash for Ratio<T>
where T: Clone + Integer + Hash,

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn inv(self) -> Ratio<T>

Returns the multiplicative inverse of self. Read more
Source§

impl<T> Inv for Ratio<T>
where T: Clone + Integer,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn inv(self) -> Ratio<T>

Returns the multiplicative inverse of self. Read more
Source§

impl<T> LowerExp for Ratio<T>
where T: LowerExp + Clone + Integer,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T> LowerHex for Ratio<T>
where T: LowerHex + Clone + Integer,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b Ratio<T>) -> Ratio<T>

Performs the * operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Ratio<T>) -> Ratio<T>

Performs the * operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b T) -> Ratio<T>

Performs the * operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &T) -> Ratio<T>

Performs the * operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Ratio<T>) -> Ratio<T>

Performs the * operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the * operator.
Source§

fn mul(self, other: T) -> Ratio<T>

Performs the * operation. Read more
Source§

impl<T> Mul<T> for Ratio<T>
where T: Clone + Integer,

Source§

type Output = Ratio<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Ratio<T>

Performs the * operation. Read more
Source§

impl<T> Mul for Ratio<T>
where T: Clone + Integer,

Source§

type Output = Ratio<T>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Ratio<T>) -> Ratio<T>

Performs the * operation. Read more
Source§

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

Source§

fn mul_assign(&mut self, other: &Ratio<T>)

Performs the *= operation. Read more
Source§

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

Source§

fn mul_assign(&mut self, other: &T)

Performs the *= operation. Read more
Source§

impl<T> MulAssign<T> for Ratio<T>
where T: Clone + Integer + NumAssign,

Source§

fn mul_assign(&mut self, other: T)

Performs the *= operation. Read more
Source§

impl<T> MulAssign for Ratio<T>
where T: Clone + Integer + NumAssign,

Source§

fn mul_assign(&mut self, other: Ratio<T>)

Performs the *= operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Ratio<T>

Performs the unary - operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Ratio<T>

Performs the unary - operation. Read more
Source§

impl<T> Num for Ratio<T>
where T: Clone + Integer,

Source§

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

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

Source§

type FromStrRadixErr = ParseRatioError

Source§

impl<T> Octal for Ratio<T>
where T: Octal + Clone + Integer,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T> One for Ratio<T>
where T: Clone + Integer,

Source§

fn one() -> Ratio<T>

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

fn is_one(&self) -> bool

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

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

impl<T> Ord for Ratio<T>
where T: Clone + Integer,

Source§

fn cmp(&self, other: &Ratio<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T> PartialEq for Ratio<T>
where T: Clone + Integer,

Source§

fn eq(&self, other: &Ratio<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> PartialOrd for Ratio<T>
where T: Clone + Integer,

Source§

fn partial_cmp(&self, other: &Ratio<T>) -> Option<Ordering>

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

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, 'b, T> Pow<&'b BigInt> for &'a Ratio<T>
where T: Clone + Integer, &'a T: Pow<&'b BigUint, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b BigInt) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<'b, T> Pow<&'b BigInt> for Ratio<T>
where T: Clone + Integer + Pow<&'b BigUint, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b BigInt) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<'a, 'b, T> Pow<&'b BigUint> for &'a Ratio<T>
where T: Clone + Integer, &'a T: Pow<&'b BigUint, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b BigUint) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<'b, T> Pow<&'b BigUint> for Ratio<T>
where T: Clone + Integer + Pow<&'b BigUint, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b BigUint) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b i128) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b i128) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b i16) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b i16) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b i32) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b i32) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b i64) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b i64) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b i8) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b i8) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b isize) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b isize) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b u128) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b u128) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b u16) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b u16) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b u32) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b u32) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b u64) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b u64) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b u8) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b u8) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b usize) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: &'b usize) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<'a, T> Pow<BigInt> for &'a Ratio<T>
where T: Clone + Integer, &'a T: for<'b> Pow<&'b BigUint, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: BigInt) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<T> Pow<BigInt> for Ratio<T>
where T: Clone + Integer + for<'b> Pow<&'b BigUint, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: BigInt) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<'a, T> Pow<BigUint> for &'a Ratio<T>
where T: Clone + Integer, &'a T: for<'b> Pow<&'b BigUint, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: BigUint) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<T> Pow<BigUint> for Ratio<T>
where T: Clone + Integer + for<'b> Pow<&'b BigUint, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: BigUint) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: i128) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: i128) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: i16) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: i16) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: i32) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: i32) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: i64) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: i64) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: i8) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: i8) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: isize) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: isize) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: u128) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<T> Pow<u128> for Ratio<T>
where T: Clone + Integer + Pow<u128, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: u128) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: u16) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<T> Pow<u16> for Ratio<T>
where T: Clone + Integer + Pow<u16, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: u16) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: u32) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<T> Pow<u32> for Ratio<T>
where T: Clone + Integer + Pow<u32, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: u32) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: u64) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<T> Pow<u64> for Ratio<T>
where T: Clone + Integer + Pow<u64, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: u64) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: u8) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<T> Pow<u8> for Ratio<T>
where T: Clone + Integer + Pow<u8, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: u8) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

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

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: usize) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<T> Pow<usize> for Ratio<T>
where T: Clone + Integer + Pow<usize, Output = T>,

Source§

type Output = Ratio<T>

The result after applying the operator.
Source§

fn pow(self, expon: usize) -> Ratio<T>

Returns self to the power rhs. Read more
Source§

impl<'a, T> Product<&'a Ratio<T>> for Ratio<T>
where T: Integer + Clone,

Source§

fn product<I>(iter: I) -> Ratio<T>
where I: Iterator<Item = &'a Ratio<T>>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<T> Product for Ratio<T>
where T: Integer + Clone,

Source§

fn product<I>(iter: I) -> Ratio<T>
where I: Iterator<Item = Ratio<T>>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the % operator.
Source§

fn rem(self, other: &'b Ratio<T>) -> Ratio<T>

Performs the % operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the % operator.
Source§

fn rem(self, other: &Ratio<T>) -> Ratio<T>

Performs the % operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the % operator.
Source§

fn rem(self, other: &'b T) -> Ratio<T>

Performs the % operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the % operator.
Source§

fn rem(self, other: &T) -> Ratio<T>

Performs the % operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the % operator.
Source§

fn rem(self, other: Ratio<T>) -> Ratio<T>

Performs the % operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the % operator.
Source§

fn rem(self, other: T) -> Ratio<T>

Performs the % operation. Read more
Source§

impl<T> Rem<T> for Ratio<T>
where T: Clone + Integer,

Source§

type Output = Ratio<T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: T) -> Ratio<T>

Performs the % operation. Read more
Source§

impl<T> Rem for Ratio<T>
where T: Clone + Integer,

Source§

type Output = Ratio<T>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Ratio<T>) -> Ratio<T>

Performs the % operation. Read more
Source§

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

Source§

fn rem_assign(&mut self, other: &Ratio<T>)

Performs the %= operation. Read more
Source§

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

Source§

fn rem_assign(&mut self, other: &T)

Performs the %= operation. Read more
Source§

impl<T> RemAssign<T> for Ratio<T>
where T: Clone + Integer + NumAssign,

Source§

fn rem_assign(&mut self, other: T)

Performs the %= operation. Read more
Source§

impl<T> RemAssign for Ratio<T>
where T: Clone + Integer + NumAssign,

Source§

fn rem_assign(&mut self, other: Ratio<T>)

Performs the %= operation. Read more
Source§

impl<T> Serialize for Ratio<T>

Available on crate feature serde only.
Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T> Signed for Ratio<T>
where T: Clone + Integer + Signed,

Source§

fn abs(&self) -> Ratio<T>

Computes the absolute value. Read more
Source§

fn abs_sub(&self, other: &Ratio<T>) -> Ratio<T>

The positive difference of two numbers. Read more
Source§

fn signum(&self) -> Ratio<T>

Returns the sign of the number. Read more
Source§

fn is_positive(&self) -> bool

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

fn is_negative(&self) -> bool

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

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

Source§

type Output = Ratio<T>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'b Ratio<T>) -> Ratio<T>

Performs the - operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Ratio<T>) -> Ratio<T>

Performs the - operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'b T) -> Ratio<T>

Performs the - operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &T) -> Ratio<T>

Performs the - operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Ratio<T>) -> Ratio<T>

Performs the - operation. Read more
Source§

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

Source§

type Output = Ratio<T>

The resulting type after applying the - operator.
Source§

fn sub(self, other: T) -> Ratio<T>

Performs the - operation. Read more
Source§

impl<T> Sub<T> for Ratio<T>
where T: Clone + Integer,

Source§

type Output = Ratio<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Ratio<T>

Performs the - operation. Read more
Source§

impl<T> Sub for Ratio<T>
where T: Clone + Integer,

Source§

type Output = Ratio<T>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Ratio<T>) -> Ratio<T>

Performs the - operation. Read more
Source§

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

Source§

fn sub_assign(&mut self, other: &Ratio<T>)

Performs the -= operation. Read more
Source§

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

Source§

fn sub_assign(&mut self, other: &T)

Performs the -= operation. Read more
Source§

impl<T> SubAssign<T> for Ratio<T>
where T: Clone + Integer + NumAssign,

Source§

fn sub_assign(&mut self, other: T)

Performs the -= operation. Read more
Source§

impl<T> SubAssign for Ratio<T>
where T: Clone + Integer + NumAssign,

Source§

fn sub_assign(&mut self, other: Ratio<T>)

Performs the -= operation. Read more
Source§

impl<'a, T> Sum<&'a Ratio<T>> for Ratio<T>
where T: Integer + Clone,

Source§

fn sum<I>(iter: I) -> Ratio<T>
where I: Iterator<Item = &'a Ratio<T>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<T> Sum for Ratio<T>
where T: Integer + Clone,

Source§

fn sum<I>(iter: I) -> Ratio<T>
where I: Iterator<Item = Ratio<T>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<T> ToPrimitive for Ratio<T>

Available on crate feature num-bigint only.
Source§

fn to_i64(&self) -> Option<i64>

Converts the value of self to an i64. If the value cannot be represented by an i64, then None is returned.
Source§

fn to_i128(&self) -> Option<i128>

Converts the value of self to an i128. If the value cannot be represented by an i128 (i64 under the default implementation), then None is returned. Read more
Source§

fn to_u64(&self) -> Option<u64>

Converts the value of self to a u64. If the value cannot be represented by a u64, then None is returned.
Source§

fn to_u128(&self) -> Option<u128>

Converts the value of self to a u128. If the value cannot be represented by a u128 (u64 under the default implementation), then None is returned. Read more
Source§

fn to_f64(&self) -> Option<f64>

Converts the value of self to an f64. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f64. Read more
Source§

fn to_isize(&self) -> Option<isize>

Converts the value of self to an isize. If the value cannot be represented by an isize, then None is returned.
Source§

fn to_i8(&self) -> Option<i8>

Converts the value of self to an i8. If the value cannot be represented by an i8, then None is returned.
Source§

fn to_i16(&self) -> Option<i16>

Converts the value of self to an i16. If the value cannot be represented by an i16, then None is returned.
Source§

fn to_i32(&self) -> Option<i32>

Converts the value of self to an i32. If the value cannot be represented by an i32, then None is returned.
Source§

fn to_usize(&self) -> Option<usize>

Converts the value of self to a usize. If the value cannot be represented by a usize, then None is returned.
Source§

fn to_u8(&self) -> Option<u8>

Converts the value of self to a u8. If the value cannot be represented by a u8, then None is returned.
Source§

fn to_u16(&self) -> Option<u16>

Converts the value of self to a u16. If the value cannot be represented by a u16, then None is returned.
Source§

fn to_u32(&self) -> Option<u32>

Converts the value of self to a u32. If the value cannot be represented by a u32, then None is returned.
Source§

fn to_f32(&self) -> Option<f32>

Converts the value of self to an f32. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f32.
Source§

impl<T> UpperExp for Ratio<T>
where T: UpperExp + Clone + Integer,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T> UpperHex for Ratio<T>
where T: UpperHex + Clone + Integer,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T> Zero for Ratio<T>
where T: Clone + Integer,

Source§

fn zero() -> Ratio<T>

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

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<T> Copy for Ratio<T>
where T: Copy,

Source§

impl<T> Eq for Ratio<T>
where T: Clone + Integer,

Auto Trait Implementations§

§

impl<T> Freeze for Ratio<T>
where T: Freeze,

§

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§

Source§

impl<T> AlignerFor<1> for T

Source§

type Aligner = AlignTo1<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<1024> for T

Source§

type Aligner = AlignTo1024<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<128> for T

Source§

type Aligner = AlignTo128<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<16> for T

Source§

type Aligner = AlignTo16<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<16384> for T

Source§

type Aligner = AlignTo16384<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<2> for T

Source§

type Aligner = AlignTo2<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<2048> for T

Source§

type Aligner = AlignTo2048<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<256> for T

Source§

type Aligner = AlignTo256<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<32> for T

Source§

type Aligner = AlignTo32<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<32768> for T

Source§

type Aligner = AlignTo32768<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<4> for T

Source§

type Aligner = AlignTo4<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<4096> for T

Source§

type Aligner = AlignTo4096<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<512> for T

Source§

type Aligner = AlignTo512<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<64> for T

Source§

type Aligner = AlignTo64<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<8> for T

Source§

type Aligner = AlignTo8<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> AlignerFor<8192> for T

Source§

type Aligner = AlignTo8192<T>

The AlignTo* type which aligns Self to ALIGNMENT.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<N, R, C, S> ArgminAdd<Matrix<N, R, C, S>, Matrix<N, R, C, <DefaultAllocator as Allocator<R, C>>::Buffer<N>>> for N
where N: Scalar + ClosedAddAssign + Copy, R: Dim, C: Dim, S: Storage<N, R, C>, DefaultAllocator: Allocator<N, R, C>,

Source§

fn add( &self, other: &Matrix<N, R, C, S>, ) -> Matrix<N, R, C, <DefaultAllocator as Allocator<R, C>>::Buffer<N>>

Add a T to self
Source§

impl<N, R, C, S> ArgminDiv<Matrix<N, R, C, S>, Matrix<N, R, C, <DefaultAllocator as Allocator<R, C>>::Buffer<N>>> for N
where N: Scalar + Copy + ClosedDivAssign, R: Dim, C: Dim, S: Storage<N, R, C>, DefaultAllocator: Allocator<N, R, C>,

Source§

fn div( &self, other: &Matrix<N, R, C, S>, ) -> Matrix<N, R, C, <DefaultAllocator as Allocator<R, C>>::Buffer<N>>

(Pointwise) Divide a T by self
Source§

impl<N, R, C, S> ArgminDot<Matrix<N, R, C, S>, Matrix<N, R, C, <DefaultAllocator as Allocator<R, C>>::Buffer<N>>> for N
where N: Scalar + Copy + ClosedMulAssign, R: Dim, C: Dim, S: Storage<N, R, C>, DefaultAllocator: Allocator<N, R, C>,

Source§

fn dot( &self, other: &Matrix<N, R, C, S>, ) -> Matrix<N, R, C, <DefaultAllocator as Allocator<R, C>>::Buffer<N>>

Dot/scalar product of T and self
Source§

impl<N, R, C, S> ArgminMul<Matrix<N, R, C, S>, Matrix<N, R, C, <DefaultAllocator as Allocator<R, C>>::Buffer<N>>> for N
where N: Scalar + Copy + ClosedMulAssign, R: Dim, C: Dim, S: Storage<N, R, C>, DefaultAllocator: Allocator<N, R, C>,

Source§

fn mul( &self, other: &Matrix<N, R, C, S>, ) -> Matrix<N, R, C, <DefaultAllocator as Allocator<R, C>>::Buffer<N>>

(Pointwise) Multiply a T with self
Source§

impl<N, R, C, S> ArgminSub<Matrix<N, R, C, S>, Matrix<N, R, C, <DefaultAllocator as Allocator<R, C>>::Buffer<N>>> for N
where N: Scalar + Copy + Sub<Output = N>, R: Dim, C: Dim, S: Storage<N, R, C>, DefaultAllocator: Allocator<N, R, C>,

Source§

fn sub( &self, other: &Matrix<N, R, C, S>, ) -> Matrix<N, R, C, <DefaultAllocator as Allocator<R, C>>::Buffer<N>>

Subtract a T from self
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

impl<T> Identity for T
where T: ?Sized,

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<N, A, B> MulAcc<A, B> for N
where &'x A: for<'x> Mul<&'x B, Output = N>, N: AddAssign,

Source§

fn mul_acc(&mut self, a: &A, b: &B)

Multiply and accumulate in this variable, formally *self += a * b.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<'a, T> RCowCompatibleRef<'a> for T
where T: Clone + 'a,

Source§

type RefC = &'a T

The (preferably) ffi-safe equivalent of &Self.
Source§

type ROwned = T

The owned version of Self::RefC.
Source§

fn as_c_ref(from: &'a T) -> <T as RCowCompatibleRef<'a>>::RefC

Converts a reference to an FFI-safe type
Source§

fn as_rust_ref(from: <T as RCowCompatibleRef<'a>>::RefC) -> &'a T

Converts an FFI-safe type to a reference
Source§

impl<S> ROExtAcc for S

Source§

fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F

Gets a reference to a field, determined by offset. Read more
Source§

fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F

Gets a muatble reference to a field, determined by offset. Read more
Source§

fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F

Gets a const pointer to a field, the field is determined by offset. Read more
Source§

fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F

Gets a mutable pointer to a field, determined by offset. Read more
Source§

impl<S> ROExtOps<Aligned> for S

Source§

fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F

Replaces a field (determined by offset) with value, returning the previous value of the field. Read more
Source§

fn f_swap<F>(&mut self, offset: FieldOffset<S, F, Aligned>, right: &mut S)

Swaps a field (determined by offset) with the same field in right. Read more
Source§

fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> F
where F: Copy,

Gets a copy of a field (determined by offset). The field is determined by offset. Read more
Source§

impl<S> ROExtOps<Unaligned> for S

Source§

fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F

Replaces a field (determined by offset) with value, returning the previous value of the field. Read more
Source§

fn f_swap<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, right: &mut S)

Swaps a field (determined by offset) with the same field in right. Read more
Source§

fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> F
where F: Copy,

Gets a copy of a field (determined by offset). The field is determined by offset. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SelfOps for T
where T: ?Sized,

Source§

fn eq_id(&self, other: &Self) -> bool

Compares the address of self with the address of other. Read more
Source§

fn piped<F, U>(self, f: F) -> U
where F: FnOnce(Self) -> U, Self: Sized,

Emulates the pipeline operator, allowing method syntax in more places. Read more
Source§

fn piped_ref<'a, F, U>(&'a self, f: F) -> U
where F: FnOnce(&'a Self) -> U,

The same as piped except that the function takes &Self Useful for functions that take &Self instead of Self. Read more
Source§

fn piped_mut<'a, F, U>(&'a mut self, f: F) -> U
where F: FnOnce(&'a mut Self) -> U,

The same as piped, except that the function takes &mut Self. Useful for functions that take &mut Self instead of Self.
Source§

fn mutated<F>(self, f: F) -> Self
where F: FnOnce(&mut Self), Self: Sized,

Mutates self using a closure taking self by mutable reference, passing it along the method chain. Read more
Source§

fn observe<F>(self, f: F) -> Self
where F: FnOnce(&Self), Self: Sized,

Observes the value of self, passing it along unmodified. Useful in long method chains. Read more
Source§

fn into_<T>(self) -> T
where Self: Into<T>,

Performs a conversion with Into. using the turbofish .into_::<_>() syntax. Read more
Source§

fn as_ref_<T>(&self) -> &T
where Self: AsRef<T>, T: ?Sized,

Performs a reference to reference conversion with AsRef, using the turbofish .as_ref_::<_>() syntax. Read more
Source§

fn as_mut_<T>(&mut self) -> &mut T
where Self: AsMut<T>, T: ?Sized,

Performs a mutable reference to mutable reference conversion with AsMut, using the turbofish .as_mut_::<_>() syntax. Read more
Source§

fn drop_(self)
where Self: Sized,

Drops self using method notation. Alternative to std::mem::drop. Read more
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

unsafe fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<This> TransmuteElement for This
where This: ?Sized,

Source§

unsafe fn transmute_element<T>(self) -> Self::TransmutedPtr
where Self: CanTransmuteElement<T>,

Transmutes the element type of this pointer.. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> TypeIdentity for T
where T: ?Sized,

Source§

type Type = T

This is always Self.
Source§

fn into_type(self) -> Self::Type
where Self: Sized, Self::Type: Sized,

Converts a value back to the original type.
Source§

fn as_type(&self) -> &Self::Type

Converts a reference back to the original type.
Source§

fn as_type_mut(&mut self) -> &mut Self::Type

Converts a mutable reference back to the original type.
Source§

fn into_type_box(self: Box<Self>) -> Box<Self::Type>

Converts a box back to the original type.
Source§

fn into_type_arc(this: Arc<Self>) -> Arc<Self::Type>

Converts an Arc back to the original type. Read more
Source§

fn into_type_rc(this: Rc<Self>) -> Rc<Self::Type>

Converts an Rc back to the original type. Read more
Source§

fn from_type(this: Self::Type) -> Self
where Self: Sized, Self::Type: Sized,

Converts a value back to the original type.
Source§

fn from_type_ref(this: &Self::Type) -> &Self

Converts a reference back to the original type.
Source§

fn from_type_mut(this: &mut Self::Type) -> &mut Self

Converts a mutable reference back to the original type.
Source§

fn from_type_box(this: Box<Self::Type>) -> Box<Self>

Converts a box back to the original type.
Source§

fn from_type_arc(this: Arc<Self::Type>) -> Arc<Self>

Converts an Arc back to the original type.
Source§

fn from_type_rc(this: Rc<Self::Type>) -> Rc<Self>

Converts an Rc back to the original type.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

Source§

impl<T, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

Source§

impl<T, Right> ClosedAddAssign<Right> for T
where T: ClosedAdd<Right> + AddAssign<Right>,

Source§

impl<T, Right> ClosedDiv<Right> for T
where T: Div<Right, Output = T> + DivAssign<Right>,

Source§

impl<T, Right> ClosedDiv<Right> for T
where T: Div<Right, Output = T> + DivAssign<Right>,

Source§

impl<T, Right> ClosedDivAssign<Right> for T
where T: ClosedDiv<Right> + DivAssign<Right>,

Source§

impl<T, Right> ClosedMul<Right> for T
where T: Mul<Right, Output = T> + MulAssign<Right>,

Source§

impl<T, Right> ClosedMul<Right> for T
where T: Mul<Right, Output = T> + MulAssign<Right>,

Source§

impl<T, Right> ClosedMulAssign<Right> for T
where T: ClosedMul<Right> + MulAssign<Right>,

Source§

impl<T> ClosedNeg for T
where T: Neg<Output = T>,

Source§

impl<T> ClosedNeg for T
where T: Neg<Output = T>,

Source§

impl<T, Right> ClosedSub<Right> for T
where T: Sub<Right, Output = T> + SubAssign<Right>,

Source§

impl<T, Right> ClosedSub<Right> for T
where T: Sub<Right, Output = T> + SubAssign<Right>,

Source§

impl<T, Right> ClosedSubAssign<Right> for T
where T: ClosedSub<Right> + SubAssign<Right>,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> FftNum for T
where T: Copy + FromPrimitive + Signed + Sync + Send + Debug + 'static,

Source§

impl<T> LinalgScalar for T
where T: One<Output = T> + Add<Output = T> + Sub<Output = T> + 'static + Mul + Copy + Div<Output = T> + Zero,

Source§

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

Source§

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

Source§

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

Source§

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>,

Source§

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

Source§

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

Source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<T> SendAlias for T

Source§

impl<T> SyncAlias for T

Source§

impl<This> ValidTag_Bounds for This
where This: Debug + Clone + PartialEq,