Type Definition relp_num::Rational32 [−][src]
type Rational32 = Ratio<u32, u32>;
Trait Implementations
impl Display for Rational32
[src]
impl Display for Rational32
[src]impl From<&'_ i16> for Rational32
[src]
impl From<&'_ i16> for Rational32
[src]impl From<&'_ i32> for Rational32
[src]
impl From<&'_ i32> for Rational32
[src]impl From<&'_ i8> for Rational32
[src]
impl From<&'_ i8> for Rational32
[src]impl From<&'_ u16> for Rational32
[src]
impl From<&'_ u16> for Rational32
[src]impl From<&'_ u32> for Rational32
[src]
impl From<&'_ u32> for Rational32
[src]impl From<&'_ u8> for Rational32
[src]
impl From<&'_ u8> for Rational32
[src]impl From<i16> for Rational32
[src]
impl From<i16> for Rational32
[src]impl From<i32> for Rational32
[src]
impl From<i32> for Rational32
[src]impl From<u16> for Rational32
[src]
impl From<u16> for Rational32
[src]impl From<u32> for Rational32
[src]
impl From<u32> for Rational32
[src]impl FromPrimitive for Rational32
[src]
impl FromPrimitive for Rational32
[src]#[must_use]fn from_i64(n: i64) -> Option<Self>
[src]
#[must_use]fn from_i64(n: i64) -> Option<Self>
[src]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 more
#[must_use]fn from_u64(n: u64) -> Option<Self>
[src]
#[must_use]fn from_u64(n: u64) -> Option<Self>
[src]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 more
#[must_use]fn from_f32(n: f32) -> Option<Self>
[src]
#[must_use]fn from_f32(n: f32) -> Option<Self>
[src]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 more
#[must_use]fn from_f64(n: f64) -> Option<Self>
[src]
#[must_use]fn from_f64(n: f64) -> Option<Self>
[src]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
fn from_isize(n: isize) -> Option<Self>
[src]
fn from_isize(n: isize) -> Option<Self>
[src]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 more
fn from_i8(n: i8) -> Option<Self>
[src]
fn from_i8(n: i8) -> Option<Self>
[src]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 more
fn from_i16(n: i16) -> Option<Self>
[src]
fn from_i16(n: i16) -> Option<Self>
[src]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 more
fn from_i32(n: i32) -> Option<Self>
[src]
fn from_i32(n: i32) -> Option<Self>
[src]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 more
fn from_i128(n: i128) -> Option<Self>
[src]
fn from_i128(n: i128) -> Option<Self>
[src]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
fn from_usize(n: usize) -> Option<Self>
[src]
fn from_usize(n: usize) -> Option<Self>
[src]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 more
fn from_u8(n: u8) -> Option<Self>
[src]
fn from_u8(n: u8) -> Option<Self>
[src]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 more
fn from_u16(n: u16) -> Option<Self>
[src]
fn from_u16(n: u16) -> Option<Self>
[src]Converts an u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
impl Neg for Rational32
[src]
impl Neg for Rational32
[src]impl Neg for &Rational32
[src]
impl Neg for &Rational32
[src]impl NonZero for Rational32
[src]
impl NonZero for Rational32
[src]#[must_use]fn is_not_zero(&self) -> bool
[src]
#[must_use]fn is_not_zero(&self) -> bool
[src]Whether the value is not equal to zero. Read more
impl NonZeroSigned for Rational32
[src]
impl NonZeroSigned for Rational32
[src]#[must_use]fn signum(&self) -> NonZeroSign
[src]
#[must_use]fn signum(&self) -> NonZeroSign
[src]Whether the value is positive or negative.
fn is_positive(&self) -> bool
[src]
fn is_positive(&self) -> bool
[src]Whether x > 0
.
fn is_negative(&self) -> bool
[src]
fn is_negative(&self) -> bool
[src]Whether x < 0
.
impl One for Rational32
[src]
impl One for Rational32
[src]impl Ord for Rational32
[src]
impl Ord for Rational32
[src]impl ToPrimitive for Rational32
[src]
impl ToPrimitive for Rational32
[src]fn to_i64(&self) -> Option<i64>
[src]
fn to_i64(&self) -> Option<i64>
[src]Converts the value of self
to an i64
. If the value cannot be
represented by an i64
, then None
is returned. Read more
fn to_u64(&self) -> Option<u64>
[src]
fn to_u64(&self) -> Option<u64>
[src]Converts the value of self
to a u64
. If the value cannot be
represented by a u64
, then None
is returned. Read more
fn to_f64(&self) -> Option<f64>
[src]
fn to_f64(&self) -> Option<f64>
[src]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
fn to_isize(&self) -> Option<isize>
[src]
fn to_isize(&self) -> Option<isize>
[src]Converts the value of self
to an isize
. If the value cannot be
represented by an isize
, then None
is returned. Read more
fn to_i8(&self) -> Option<i8>
[src]
fn to_i8(&self) -> Option<i8>
[src]Converts the value of self
to an i8
. If the value cannot be
represented by an i8
, then None
is returned. Read more
fn to_i16(&self) -> Option<i16>
[src]
fn to_i16(&self) -> Option<i16>
[src]Converts the value of self
to an i16
. If the value cannot be
represented by an i16
, then None
is returned. Read more
fn to_i32(&self) -> Option<i32>
[src]
fn to_i32(&self) -> Option<i32>
[src]Converts the value of self
to an i32
. If the value cannot be
represented by an i32
, then None
is returned. Read more
fn to_i128(&self) -> Option<i128>
[src]
fn to_i128(&self) -> Option<i128>
[src]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
fn to_usize(&self) -> Option<usize>
[src]
fn to_usize(&self) -> Option<usize>
[src]Converts the value of self
to a usize
. If the value cannot be
represented by a usize
, then None
is returned. Read more
fn to_u8(&self) -> Option<u8>
[src]
fn to_u8(&self) -> Option<u8>
[src]Converts the value of self
to a u8
. If the value cannot be
represented by a u8
, then None
is returned. Read more
fn to_u16(&self) -> Option<u16>
[src]
fn to_u16(&self) -> Option<u16>
[src]Converts the value of self
to a u16
. If the value cannot be
represented by a u16
, then None
is returned. Read more
fn to_u32(&self) -> Option<u32>
[src]
fn to_u32(&self) -> Option<u32>
[src]Converts the value of self
to a u32
. If the value cannot be
represented by a u32
, then None
is returned. Read more
impl Zero for Rational32
[src]
impl Zero for Rational32
[src]