Struct qiniu_http_client::Ratio
source · pub struct Ratio<T> { /* private fields */ }Expand description
Represents the ratio between two numbers.
Implementations
sourceimpl<T> Ratio<T>
impl<T> Ratio<T>
These method are const for Rust 1.31 and later.
sourceimpl<T> Ratio<T>where
T: Clone + Integer,
impl<T> Ratio<T>where
T: Clone + Integer,
sourcepub fn from_integer(t: T) -> Ratio<T>
pub fn from_integer(t: T) -> Ratio<T>
Creates a Ratio representing the integer t.
sourcepub fn to_integer(&self) -> T
pub fn to_integer(&self) -> T
Converts to an integer, rounding towards zero.
sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Returns true if the rational number is an integer (denominator is 1).
sourcepub fn reduced(&self) -> Ratio<T>
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.
sourcepub fn round(&self) -> Ratio<T>
pub fn round(&self) -> Ratio<T>
Rounds to the nearest integer. Rounds half-way cases away from zero.
Trait Implementations
sourceimpl<'a, T> AddAssign<&'a Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<'a, T> AddAssign<&'a Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn add_assign(&mut self, other: &Ratio<T>)
fn add_assign(&mut self, other: &Ratio<T>)
Performs the
+= operation. Read moresourceimpl<'a, T> AddAssign<&'a T> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<'a, T> AddAssign<&'a T> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn add_assign(&mut self, other: &T)
fn add_assign(&mut self, other: &T)
Performs the
+= operation. Read moresourceimpl<T> AddAssign<Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<T> AddAssign<Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn add_assign(&mut self, other: Ratio<T>)
fn add_assign(&mut self, other: Ratio<T>)
Performs the
+= operation. Read moresourceimpl<T> AddAssign<T> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<T> AddAssign<T> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn add_assign(&mut self, other: T)
fn add_assign(&mut self, other: T)
Performs the
+= operation. Read moresourceimpl<T> CheckedAdd for Ratio<T>where
T: Clone + Integer + CheckedMul + CheckedAdd,
impl<T> CheckedAdd for Ratio<T>where
T: Clone + Integer + CheckedMul + CheckedAdd,
sourceimpl<T> CheckedDiv for Ratio<T>where
T: Clone + Integer + CheckedMul,
impl<T> CheckedDiv for Ratio<T>where
T: Clone + Integer + CheckedMul,
sourceimpl<T> CheckedMul for Ratio<T>where
T: Clone + Integer + CheckedMul,
impl<T> CheckedMul for Ratio<T>where
T: Clone + Integer + CheckedMul,
sourceimpl<T> CheckedSub for Ratio<T>where
T: Clone + Integer + CheckedMul + CheckedSub,
impl<T> CheckedSub for Ratio<T>where
T: Clone + Integer + CheckedMul + CheckedSub,
sourceimpl<'a, T> DivAssign<&'a Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<'a, T> DivAssign<&'a Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn div_assign(&mut self, other: &Ratio<T>)
fn div_assign(&mut self, other: &Ratio<T>)
Performs the
/= operation. Read moresourceimpl<'a, T> DivAssign<&'a T> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<'a, T> DivAssign<&'a T> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn div_assign(&mut self, other: &T)
fn div_assign(&mut self, other: &T)
Performs the
/= operation. Read moresourceimpl<T> DivAssign<Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<T> DivAssign<Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn div_assign(&mut self, other: Ratio<T>)
fn div_assign(&mut self, other: Ratio<T>)
Performs the
/= operation. Read moresourceimpl<T> DivAssign<T> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<T> DivAssign<T> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn div_assign(&mut self, other: T)
fn div_assign(&mut self, other: T)
Performs the
/= operation. Read moresourceimpl FromPrimitive for Ratio<i128>
impl FromPrimitive for Ratio<i128>
sourcefn from_i64(n: i64) -> Option<Ratio<i128>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<i128>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<i128>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<i128>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<i128>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<i128>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl FromPrimitive for Ratio<i16>
impl FromPrimitive for Ratio<i16>
sourcefn from_i64(n: i64) -> Option<Ratio<i16>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<i16>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<i16>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<i16>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<i16>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<i16>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl FromPrimitive for Ratio<i32>
impl FromPrimitive for Ratio<i32>
sourcefn from_i64(n: i64) -> Option<Ratio<i32>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<i32>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<i32>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<i32>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<i32>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<i32>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl FromPrimitive for Ratio<i64>
impl FromPrimitive for Ratio<i64>
sourcefn from_i64(n: i64) -> Option<Ratio<i64>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<i64>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<i64>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<i64>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<i64>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<i64>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl FromPrimitive for Ratio<i8>
impl FromPrimitive for Ratio<i8>
sourcefn from_i64(n: i64) -> Option<Ratio<i8>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<i8>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<i8>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<i8>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<i8>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<i8>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl FromPrimitive for Ratio<isize>
impl FromPrimitive for Ratio<isize>
sourcefn from_i64(n: i64) -> Option<Ratio<isize>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<isize>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<isize>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<isize>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<isize>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<isize>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl FromPrimitive for Ratio<u128>
impl FromPrimitive for Ratio<u128>
sourcefn from_i64(n: i64) -> Option<Ratio<u128>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<u128>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<u128>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<u128>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<u128>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<u128>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl FromPrimitive for Ratio<u16>
impl FromPrimitive for Ratio<u16>
sourcefn from_i64(n: i64) -> Option<Ratio<u16>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<u16>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<u16>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<u16>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<u16>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<u16>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl FromPrimitive for Ratio<u32>
impl FromPrimitive for Ratio<u32>
sourcefn from_i64(n: i64) -> Option<Ratio<u32>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<u32>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<u32>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<u32>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<u32>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<u32>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl FromPrimitive for Ratio<u64>
impl FromPrimitive for Ratio<u64>
sourcefn from_i64(n: i64) -> Option<Ratio<u64>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<u64>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<u64>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<u64>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<u64>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<u64>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl FromPrimitive for Ratio<u8>
impl FromPrimitive for Ratio<u8>
sourcefn from_i64(n: i64) -> Option<Ratio<u8>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<u8>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<u8>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<u8>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<u8>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<u8>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl FromPrimitive for Ratio<usize>
impl FromPrimitive for Ratio<usize>
sourcefn from_i64(n: i64) -> Option<Ratio<usize>>
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. Read moresourcefn from_i128(n: i128) -> Option<Ratio<usize>>
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 moresourcefn from_u64(n: u64) -> Option<Ratio<usize>>
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. Read moresourcefn from_u128(n: u128) -> Option<Ratio<usize>>
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 moresourcefn from_f32(n: f32) -> Option<Ratio<usize>>
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. Read moresourcefn from_f64(n: f64) -> Option<Ratio<usize>>
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 moresourcefn from_isize(n: isize) -> Option<Self>
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. Read moresourcefn from_i8(n: i8) -> Option<Self>
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. Read moresourcefn from_i16(n: i16) -> Option<Self>
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. Read moresourcefn from_i32(n: i32) -> Option<Self>
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. Read moresourcefn from_usize(n: usize) -> Option<Self>
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. Read moresourcefn from_u8(n: u8) -> Option<Self>
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. Read moresourceimpl<T> FromStr for Ratio<T>where
T: FromStr + Clone + Integer,
impl<T> FromStr for Ratio<T>where
T: FromStr + Clone + Integer,
type Err = ParseRatioError
type Err = ParseRatioError
The associated error which can be returned from parsing.
sourceimpl<'a, T> MulAssign<&'a Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<'a, T> MulAssign<&'a Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn mul_assign(&mut self, other: &Ratio<T>)
fn mul_assign(&mut self, other: &Ratio<T>)
Performs the
*= operation. Read moresourceimpl<'a, T> MulAssign<&'a T> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<'a, T> MulAssign<&'a T> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn mul_assign(&mut self, other: &T)
fn mul_assign(&mut self, other: &T)
Performs the
*= operation. Read moresourceimpl<T> MulAssign<Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<T> MulAssign<Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn mul_assign(&mut self, other: Ratio<T>)
fn mul_assign(&mut self, other: Ratio<T>)
Performs the
*= operation. Read moresourceimpl<T> MulAssign<T> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<T> MulAssign<T> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn mul_assign(&mut self, other: T)
fn mul_assign(&mut self, other: T)
Performs the
*= operation. Read moresourceimpl<T> Num for Ratio<T>where
T: Clone + Integer,
impl<T> Num for Ratio<T>where
T: Clone + Integer,
sourcefn from_str_radix(s: &str, radix: u32) -> Result<Ratio<T>, ParseRatioError>
fn from_str_radix(s: &str, radix: u32) -> Result<Ratio<T>, ParseRatioError>
Parses numer/denom where the numbers are in base radix.
type FromStrRadixErr = ParseRatioError
sourceimpl<T> Ord for Ratio<T>where
T: Clone + Integer,
impl<T> Ord for Ratio<T>where
T: Clone + Integer,
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T> PartialEq<Ratio<T>> for Ratio<T>where
T: Clone + Integer,
impl<T> PartialEq<Ratio<T>> for Ratio<T>where
T: Clone + Integer,
sourceimpl<T> PartialOrd<Ratio<T>> for Ratio<T>where
T: Clone + Integer,
impl<T> PartialOrd<Ratio<T>> for Ratio<T>where
T: Clone + Integer,
sourcefn partial_cmp(&self, other: &Ratio<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &Ratio<T>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresourceimpl<'a, 'b, T> Pow<&'b i128> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u128, Output = T>,
impl<'a, 'b, T> Pow<&'b i128> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u128, Output = T>,
sourceimpl<'a, 'b, T> Pow<&'b i16> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u16, Output = T>,
impl<'a, 'b, T> Pow<&'b i16> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u16, Output = T>,
sourceimpl<'a, 'b, T> Pow<&'b i32> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u32, Output = T>,
impl<'a, 'b, T> Pow<&'b i32> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u32, Output = T>,
sourceimpl<'a, 'b, T> Pow<&'b i64> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u64, Output = T>,
impl<'a, 'b, T> Pow<&'b i64> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u64, Output = T>,
sourceimpl<'a, 'b, T> Pow<&'b i8> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u8, Output = T>,
impl<'a, 'b, T> Pow<&'b i8> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u8, Output = T>,
sourceimpl<'a, 'b, T> Pow<&'b isize> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<usize, Output = T>,
impl<'a, 'b, T> Pow<&'b isize> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<usize, Output = T>,
sourceimpl<'a, 'b, T> Pow<&'b u128> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u128, Output = T>,
impl<'a, 'b, T> Pow<&'b u128> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u128, Output = T>,
sourceimpl<'a, 'b, T> Pow<&'b u16> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u16, Output = T>,
impl<'a, 'b, T> Pow<&'b u16> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u16, Output = T>,
sourceimpl<'a, 'b, T> Pow<&'b u32> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u32, Output = T>,
impl<'a, 'b, T> Pow<&'b u32> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u32, Output = T>,
sourceimpl<'a, 'b, T> Pow<&'b u64> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u64, Output = T>,
impl<'a, 'b, T> Pow<&'b u64> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u64, Output = T>,
sourceimpl<'a, 'b, T> Pow<&'b u8> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u8, Output = T>,
impl<'a, 'b, T> Pow<&'b u8> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<u8, Output = T>,
sourceimpl<'a, 'b, T> Pow<&'b usize> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<usize, Output = T>,
impl<'a, 'b, T> Pow<&'b usize> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<usize, Output = T>,
sourceimpl<'a, T> Pow<isize> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<usize, Output = T>,
impl<'a, T> Pow<isize> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<usize, Output = T>,
sourceimpl<'a, T> Pow<usize> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<usize, Output = T>,
impl<'a, T> Pow<usize> for &'a Ratio<T>where
T: Clone + Integer,
&'a T: Pow<usize, Output = T>,
sourceimpl<'a, T> RemAssign<&'a Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<'a, T> RemAssign<&'a Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn rem_assign(&mut self, other: &Ratio<T>)
fn rem_assign(&mut self, other: &Ratio<T>)
Performs the
%= operation. Read moresourceimpl<'a, T> RemAssign<&'a T> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<'a, T> RemAssign<&'a T> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn rem_assign(&mut self, other: &T)
fn rem_assign(&mut self, other: &T)
Performs the
%= operation. Read moresourceimpl<T> RemAssign<Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<T> RemAssign<Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn rem_assign(&mut self, other: Ratio<T>)
fn rem_assign(&mut self, other: Ratio<T>)
Performs the
%= operation. Read moresourceimpl<T> RemAssign<T> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<T> RemAssign<T> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn rem_assign(&mut self, other: T)
fn rem_assign(&mut self, other: T)
Performs the
%= operation. Read moresourceimpl<T> Signed for Ratio<T>where
T: Clone + Integer + Signed,
impl<T> Signed for Ratio<T>where
T: Clone + Integer + Signed,
sourcefn abs_sub(&self, other: &Ratio<T>) -> Ratio<T>
fn abs_sub(&self, other: &Ratio<T>) -> Ratio<T>
The positive difference of two numbers. Read more
sourcefn is_positive(&self) -> bool
fn is_positive(&self) -> bool
Returns true if the number is positive and false if the number is zero or negative.
sourcefn is_negative(&self) -> bool
fn is_negative(&self) -> bool
Returns true if the number is negative and false if the number is zero or positive.
sourceimpl<'a, T> SubAssign<&'a Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<'a, T> SubAssign<&'a Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn sub_assign(&mut self, other: &Ratio<T>)
fn sub_assign(&mut self, other: &Ratio<T>)
Performs the
-= operation. Read moresourceimpl<'a, T> SubAssign<&'a T> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<'a, T> SubAssign<&'a T> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn sub_assign(&mut self, other: &T)
fn sub_assign(&mut self, other: &T)
Performs the
-= operation. Read moresourceimpl<T> SubAssign<Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<T> SubAssign<Ratio<T>> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn sub_assign(&mut self, other: Ratio<T>)
fn sub_assign(&mut self, other: Ratio<T>)
Performs the
-= operation. Read moresourceimpl<T> SubAssign<T> for Ratio<T>where
T: Clone + Integer + NumAssign,
impl<T> SubAssign<T> for Ratio<T>where
T: Clone + Integer + NumAssign,
sourcefn sub_assign(&mut self, other: T)
fn sub_assign(&mut self, other: T)
Performs the
-= operation. Read moresourceimpl ToPrimitive for Ratio<i16>
impl ToPrimitive for Ratio<i16>
sourcefn to_i64(&self) -> Option<i64>
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. Read moresourcefn to_i128(&self) -> Option<i128>
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 moresourcefn to_u64(&self) -> Option<u64>
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. Read moresourcefn to_u128(&self) -> Option<u128>
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 moresourcefn to_f64(&self) -> Option<f64>
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 moresourcefn to_isize(&self) -> Option<isize>
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. Read moresourcefn to_i8(&self) -> Option<i8>
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. Read moresourcefn to_i16(&self) -> Option<i16>
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. Read moresourcefn to_i32(&self) -> Option<i32>
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. Read moresourcefn to_usize(&self) -> Option<usize>
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. Read moresourcefn to_u8(&self) -> Option<u8>
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. Read moresourcefn to_u16(&self) -> Option<u16>
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. Read moresourceimpl ToPrimitive for Ratio<i32>
impl ToPrimitive for Ratio<i32>
sourcefn to_i64(&self) -> Option<i64>
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. Read moresourcefn to_i128(&self) -> Option<i128>
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 moresourcefn to_u64(&self) -> Option<u64>
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. Read moresourcefn to_u128(&self) -> Option<u128>
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 moresourcefn to_f64(&self) -> Option<f64>
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 moresourcefn to_isize(&self) -> Option<isize>
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. Read moresourcefn to_i8(&self) -> Option<i8>
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. Read moresourcefn to_i16(&self) -> Option<i16>
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. Read moresourcefn to_i32(&self) -> Option<i32>
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. Read moresourcefn to_usize(&self) -> Option<usize>
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. Read moresourcefn to_u8(&self) -> Option<u8>
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. Read moresourcefn to_u16(&self) -> Option<u16>
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. Read moresourceimpl ToPrimitive for Ratio<i64>
impl ToPrimitive for Ratio<i64>
sourcefn to_i64(&self) -> Option<i64>
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. Read moresourcefn to_i128(&self) -> Option<i128>
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 moresourcefn to_u64(&self) -> Option<u64>
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. Read moresourcefn to_u128(&self) -> Option<u128>
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 moresourcefn to_f64(&self) -> Option<f64>
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 moresourcefn to_isize(&self) -> Option<isize>
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. Read moresourcefn to_i8(&self) -> Option<i8>
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. Read moresourcefn to_i16(&self) -> Option<i16>
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. Read moresourcefn to_i32(&self) -> Option<i32>
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. Read moresourcefn to_usize(&self) -> Option<usize>
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. Read moresourcefn to_u8(&self) -> Option<u8>
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. Read moresourcefn to_u16(&self) -> Option<u16>
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. Read moresourceimpl ToPrimitive for Ratio<i8>
impl ToPrimitive for Ratio<i8>
sourcefn to_i64(&self) -> Option<i64>
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. Read moresourcefn to_i128(&self) -> Option<i128>
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 moresourcefn to_u64(&self) -> Option<u64>
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. Read moresourcefn to_u128(&self) -> Option<u128>
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 moresourcefn to_f64(&self) -> Option<f64>
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 moresourcefn to_isize(&self) -> Option<isize>
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. Read moresourcefn to_i8(&self) -> Option<i8>
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. Read moresourcefn to_i16(&self) -> Option<i16>
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. Read moresourcefn to_i32(&self) -> Option<i32>
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. Read moresourcefn to_usize(&self) -> Option<usize>
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. Read moresourcefn to_u8(&self) -> Option<u8>
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. Read moresourcefn to_u16(&self) -> Option<u16>
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. Read moresourceimpl ToPrimitive for Ratio<isize>
impl ToPrimitive for Ratio<isize>
sourcefn to_i64(&self) -> Option<i64>
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. Read moresourcefn to_i128(&self) -> Option<i128>
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 moresourcefn to_u64(&self) -> Option<u64>
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. Read moresourcefn to_u128(&self) -> Option<u128>
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 moresourcefn to_f64(&self) -> Option<f64>
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 moresourcefn to_isize(&self) -> Option<isize>
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. Read moresourcefn to_i8(&self) -> Option<i8>
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. Read moresourcefn to_i16(&self) -> Option<i16>
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. Read moresourcefn to_i32(&self) -> Option<i32>
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. Read moresourcefn to_usize(&self) -> Option<usize>
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. Read moresourcefn to_u8(&self) -> Option<u8>
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. Read moresourcefn to_u16(&self) -> Option<u16>
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. Read moresourceimpl ToPrimitive for Ratio<u16>
impl ToPrimitive for Ratio<u16>
sourcefn to_i64(&self) -> Option<i64>
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. Read moresourcefn to_i128(&self) -> Option<i128>
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 moresourcefn to_u64(&self) -> Option<u64>
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. Read moresourcefn to_u128(&self) -> Option<u128>
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 moresourcefn to_f64(&self) -> Option<f64>
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 moresourcefn to_isize(&self) -> Option<isize>
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. Read moresourcefn to_i8(&self) -> Option<i8>
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. Read moresourcefn to_i16(&self) -> Option<i16>
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. Read moresourcefn to_i32(&self) -> Option<i32>
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. Read moresourcefn to_usize(&self) -> Option<usize>
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. Read moresourcefn to_u8(&self) -> Option<u8>
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. Read moresourcefn to_u16(&self) -> Option<u16>
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. Read moresourceimpl ToPrimitive for Ratio<u32>
impl ToPrimitive for Ratio<u32>
sourcefn to_i64(&self) -> Option<i64>
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. Read moresourcefn to_i128(&self) -> Option<i128>
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 moresourcefn to_u64(&self) -> Option<u64>
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. Read moresourcefn to_u128(&self) -> Option<u128>
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 moresourcefn to_f64(&self) -> Option<f64>
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 moresourcefn to_isize(&self) -> Option<isize>
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. Read moresourcefn to_i8(&self) -> Option<i8>
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. Read moresourcefn to_i16(&self) -> Option<i16>
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. Read moresourcefn to_i32(&self) -> Option<i32>
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. Read moresourcefn to_usize(&self) -> Option<usize>
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. Read moresourcefn to_u8(&self) -> Option<u8>
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. Read moresourcefn to_u16(&self) -> Option<u16>
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. Read moresourceimpl ToPrimitive for Ratio<u64>
impl ToPrimitive for Ratio<u64>
sourcefn to_i64(&self) -> Option<i64>
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. Read moresourcefn to_i128(&self) -> Option<i128>
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 moresourcefn to_u64(&self) -> Option<u64>
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. Read moresourcefn to_u128(&self) -> Option<u128>
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 moresourcefn to_f64(&self) -> Option<f64>
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 moresourcefn to_isize(&self) -> Option<isize>
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. Read moresourcefn to_i8(&self) -> Option<i8>
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. Read moresourcefn to_i16(&self) -> Option<i16>
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. Read moresourcefn to_i32(&self) -> Option<i32>
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. Read moresourcefn to_usize(&self) -> Option<usize>
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. Read moresourcefn to_u8(&self) -> Option<u8>
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. Read moresourcefn to_u16(&self) -> Option<u16>
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. Read moresourceimpl ToPrimitive for Ratio<u8>
impl ToPrimitive for Ratio<u8>
sourcefn to_i64(&self) -> Option<i64>
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. Read moresourcefn to_i128(&self) -> Option<i128>
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 moresourcefn to_u64(&self) -> Option<u64>
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. Read moresourcefn to_u128(&self) -> Option<u128>
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 moresourcefn to_f64(&self) -> Option<f64>
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 moresourcefn to_isize(&self) -> Option<isize>
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. Read moresourcefn to_i8(&self) -> Option<i8>
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. Read moresourcefn to_i16(&self) -> Option<i16>
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. Read moresourcefn to_i32(&self) -> Option<i32>
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. Read moresourcefn to_usize(&self) -> Option<usize>
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. Read moresourcefn to_u8(&self) -> Option<u8>
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. Read moresourcefn to_u16(&self) -> Option<u16>
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. Read moresourceimpl ToPrimitive for Ratio<usize>
impl ToPrimitive for Ratio<usize>
sourcefn to_i64(&self) -> Option<i64>
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. Read moresourcefn to_i128(&self) -> Option<i128>
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 moresourcefn to_u64(&self) -> Option<u64>
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. Read moresourcefn to_u128(&self) -> Option<u128>
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 moresourcefn to_f64(&self) -> Option<f64>
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 moresourcefn to_isize(&self) -> Option<isize>
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. Read moresourcefn to_i8(&self) -> Option<i8>
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. Read moresourcefn to_i16(&self) -> Option<i16>
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. Read moresourcefn to_i32(&self) -> Option<i32>
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. Read moresourcefn to_usize(&self) -> Option<usize>
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. Read moresourcefn to_u8(&self) -> Option<u8>
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. Read moresourcefn to_u16(&self) -> Option<u16>
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. Read moreimpl<T> Copy for Ratio<T>where
T: Copy,
impl<T> Eq for Ratio<T>where
T: Clone + Integer,
Auto Trait Implementations
impl<T> RefUnwindSafe for Ratio<T>where
T: RefUnwindSafe,
impl<T> Send for Ratio<T>where
T: Send,
impl<T> Sync for Ratio<T>where
T: Sync,
impl<T> Unpin for Ratio<T>where
T: Unpin,
impl<T> UnwindSafe for Ratio<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
sourcefn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
sourcefn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moresourcefn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moresourcefn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
sourcefn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
sourcefn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
Borrows
self, then passes self.as_ref() into the pipe function.sourcefn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
sourceimpl<T> Tap for T
impl<T> Tap for T
sourcefn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
Immutable access to the
Borrow<B> of a value. Read moresourcefn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
Mutable access to the
BorrowMut<B> of a value. Read moresourcefn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
Immutable access to the
AsRef<R> view of a value. Read moresourcefn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
Mutable access to the
AsMut<R> view of a value. Read moresourcefn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
Immutable access to the
Deref::Target of a value. Read moresourcefn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Mutable access to the
Deref::Target of a value. Read moresourcefn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.sourcefn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds. Read moresourcefn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
Calls
.tap_borrow() only in debug builds, and is erased in release
builds. Read moresourcefn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds. Read moresourcefn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
Calls
.tap_ref() only in debug builds, and is erased in release
builds. Read moresourcefn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds. Read more