#[repr(transparent)]pub struct Rational { /* private fields */ }
Expand description
Multiple precision rational value.
Implementations
sourceimpl Rational
impl Rational
sourcepub fn add_integer(&self, other: &Integer) -> Self
pub fn add_integer(&self, other: &Integer) -> Self
Add a rational value and an integer value and return the rational result.
sourcepub fn add_assign(&mut self, other: &Self)
pub fn add_assign(&mut self, other: &Self)
Add two rationals and assign the result to self.
sourcepub fn add_assign_integer(&mut self, other: &Integer)
pub fn add_assign_integer(&mut self, other: &Integer)
Add a rational value and an integer value and assign the result to self.
sourcepub fn subtract(&self, other: &Self) -> Self
pub fn subtract(&self, other: &Self) -> Self
Subtract two rational values and return the result.
sourcepub fn subtract_integer(&self, other: &Integer) -> Self
pub fn subtract_integer(&self, other: &Integer) -> Self
Subtract a rational value and an integer value and return the rational result.
sourcepub fn subtract_assign(&mut self, other: &Self)
pub fn subtract_assign(&mut self, other: &Self)
Subtract two rationals and assign the result to self.
sourcepub fn subtract_assign_integer(&mut self, other: &Integer)
pub fn subtract_assign_integer(&mut self, other: &Integer)
Subtract a rational value and an integer value and assign the result to self.
sourcepub fn multiply(&self, other: &Self) -> Self
pub fn multiply(&self, other: &Self) -> Self
Multiply two rational values and return the result.
sourcepub fn multiply_integer(&self, other: &Integer) -> Self
pub fn multiply_integer(&self, other: &Integer) -> Self
Multiply a rational value and an integer value and return the rational result.
sourcepub fn multiply_assign(&mut self, other: &Self)
pub fn multiply_assign(&mut self, other: &Self)
Multiply two rationals and assign the result to self.
sourcepub fn multiply_assign_integer(&mut self, other: &Integer)
pub fn multiply_assign_integer(&mut self, other: &Integer)
Multiply a rational value and an integer value and assign the result to self.
sourcepub fn divide_integer(&self, other: &Integer) -> Self
pub fn divide_integer(&self, other: &Integer) -> Self
Divide a rational value and an integer value and return the rational result.
sourcepub fn divide_assign(&mut self, other: &Self)
pub fn divide_assign(&mut self, other: &Self)
Divide two rationals and assign the result to self.
sourcepub fn divide_assign_integer(&mut self, other: &Integer)
pub fn divide_assign_integer(&mut self, other: &Integer)
Divide a rational value and an integer value and assign the result to self.
sourcepub fn absolute_value(&self) -> Self
pub fn absolute_value(&self) -> Self
Return the absolute value
sourcepub fn absolute_value_assign(&mut self)
pub fn absolute_value_assign(&mut self)
Assign the absolute value to self
sourcepub fn negate_assign(&mut self)
pub fn negate_assign(&mut self)
Assign the additive inverse to self
sourcepub fn reciprocal(&self) -> Self
pub fn reciprocal(&self) -> Self
Return the multiplicative inverse
sourcepub fn reciprocal_assign(&mut self)
pub fn reciprocal_assign(&mut self)
Assign the multiplicative inverse to self
sourceimpl Rational
impl Rational
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new rational with a default value of zero (0/1).
Example
use reckoner::Rational;
let r = Rational::new();
assert_eq!(r, (0, 1));
sourcepub unsafe fn from_raw(raw: *mut mpq_t) -> Self
pub unsafe fn from_raw(raw: *mut mpq_t) -> Self
Construct a Rational from a raw non-null pointer to
creachadair_imath_sys::mpq_t
.
Safety
This function must only every be called once for a given pointer, and
the pointer must point to an initialized creachadair_imath_sys::mpq_t
struct. The recommendation is to only use raw pointers from the
Rational::into_raw
function.
In ths context, initialized means that the
creachadair_imath_sys::mpq_t
has been the argument of a call to
creachadair_imath_sys::mp_rat_init
.
Example
use creachadair_imath_sys::{mp_rat_zero, MP_OK};
use reckoner::Rational;
let a = Rational::from((456, 123));
assert_eq!(a, (456, 123));
let a_raw = Rational::into_raw(a);
unsafe { mp_rat_zero(a_raw) };
let a = unsafe { Rational::from_raw(a_raw) };
assert_eq!(a, (0, 1));
sourcepub fn into_raw(rational: Rational) -> *mut mpq_t
pub fn into_raw(rational: Rational) -> *mut mpq_t
Consumes the Rational, returning a wrapped raw pointer.
Example
use creachadair_imath_sys::{mp_rat_add, MP_OK};
use reckoner::Rational;
let a = Rational::from((377, 500));
let b = Rational::from((123, 500));
let c = Rational::new();
let a_raw = Rational::into_raw(a);
let b_raw = Rational::into_raw(b);
let c_raw = Rational::into_raw(c);
let op_res = unsafe { mp_rat_add(a_raw, b_raw, c_raw) };
if op_res != unsafe { MP_OK } {
panic!("Operation failed.")
}
let a = unsafe { Rational::from_raw(a_raw) };
let b = unsafe { Rational::from_raw(b_raw) };
let c = unsafe { Rational::from_raw(c_raw) };
assert_eq!(a, (377, 500));
assert_eq!(b, (123, 500));
assert_eq!(c, (500, 500));
sourcepub fn reduce(&mut self)
pub fn reduce(&mut self)
Reduces r
in-place to lowest terms and canonical form.
Zero is represented as 0/1, one as 1/1, and signs are adjusted so that the sign of the value is carried by the numerator.
Example
use reckoner::Rational;
let mut a = Rational::from((24, 2));
let mut b = Rational::from((24, 3));
let mut c = Rational::from((24, 4));
a.reduce();
b.reduce();
c.reduce();
assert_eq!(a, (12, 1));
assert_eq!(b, (8, 1));
assert_eq!(c, (6, 1));
sourcepub fn zero(&mut self)
pub fn zero(&mut self)
Set value of integer to zero
Example
use reckoner::Rational;
let mut r = Rational::from((1234567u128, 1346172348u64));
r.zero();
assert_eq!(r, (0, 1));
sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Returns true if the denominator is 1.
Example
use reckoner::Rational;
assert!(Rational::from((0, 1)).is_integer());
assert!(Rational::from((1, 1)).is_integer());
assert!(!Rational::from((3, 25)).is_integer());
sourcepub fn compare(&self, rhs: &Self) -> Ordering
pub fn compare(&self, rhs: &Self) -> Ordering
Compare two rationals
Example
use core::cmp::Ordering;
use reckoner::Rational;
let a = Rational::from((123, 500));
let b = Rational::from((377, 500));
assert_eq!(a.compare(&b), Ordering::Less);
assert_eq!(b.compare(&a), Ordering::Greater);
assert_eq!(a.compare(&a), Ordering::Equal);
sourcepub fn compare_magnitude(&self, rhs: &Self) -> Ordering
pub fn compare_magnitude(&self, rhs: &Self) -> Ordering
Compare the magnitude of two rationals, not taking sign into account.
Example
use core::cmp::Ordering;
use reckoner::Rational;
let a = Rational::from((123, 500));
let b = Rational::from((-377, 500));
assert_eq!(a.compare(&b), Ordering::Greater);
assert_eq!(a.compare_magnitude(&b), Ordering::Less);
sourcepub fn compare_zero(&self) -> Ordering
pub fn compare_zero(&self) -> Ordering
Compare a rational to zero.
Example
use core::cmp::Ordering;
use reckoner::Rational;
let a = Rational::from((123, 500));
let b = Rational::from((-377, 500));
assert_eq!(a.compare_zero(), Ordering::Greater);
assert_eq!(b.compare_zero(), Ordering::Less);
sourcepub fn numerator(&self) -> Integer
pub fn numerator(&self) -> Integer
Return a copy of the numerator of the rational value
Example
use reckoner::Rational;
let a = Rational::from((34256, 54587));
assert_eq!(a.numerator(), 34256);
sourcepub fn denominator(&self) -> Integer
pub fn denominator(&self) -> Integer
Return a copy of the denominator of the rational value
Example
use reckoner::Rational;
let a = Rational::from((34256, 54587));
assert_eq!(a.denominator(), 54587);
sourcepub fn copy_to(&self, other: &mut Self)
pub fn copy_to(&self, other: &mut Self)
Replaces the value of other
with a copy of the value of self
. No new
memory is allocated unless self
has more significant digits than
other
has allocated.
Example
use reckoner::Rational;
let a = Rational::from((34256, 54587));
let mut b = Rational::new();
a.copy_to(&mut b);
assert_eq!(a, b);
assert_eq!(b, (34256, 54587));
sourcepub fn to_decimal(&self, rounding_mode: RoundMode, max_precision: u16) -> String
pub fn to_decimal(&self, rounding_mode: RoundMode, max_precision: u16) -> String
Converts the value of self
to a string in base-10 decimal-point
notation. It generates max_precision
digits of precision and takes a
RoundMode
argument that determines how the ratio will be converted to
decimal.
Example
use reckoner::{Rational, RoundMode};
let r = Rational::from((1146408, 364913));
assert_eq!(r.to_decimal(RoundMode::HalfUp, 6), "3.141593");
assert_eq!(r.to_decimal(RoundMode::HalfUp, 5), "3.14159");
assert_eq!(r.to_decimal(RoundMode::HalfUp, 4), "3.1416");
assert_eq!(r.to_decimal(RoundMode::HalfUp, 3), "3.142");
Trait Implementations
sourceimpl AddAssign<&Integer> for Rational
impl AddAssign<&Integer> for Rational
sourcefn add_assign(&mut self, rhs: &Integer)
fn add_assign(&mut self, rhs: &Integer)
+=
operation. Read moresourceimpl AddAssign<&Rational> for Rational
impl AddAssign<&Rational> for Rational
sourcefn add_assign(&mut self, rhs: &Rational)
fn add_assign(&mut self, rhs: &Rational)
+=
operation. Read moresourceimpl AddAssign<&i128> for Rational
impl AddAssign<&i128> for Rational
sourcefn add_assign(&mut self, rhs: &i128)
fn add_assign(&mut self, rhs: &i128)
+=
operation. Read moresourceimpl AddAssign<&i16> for Rational
impl AddAssign<&i16> for Rational
sourcefn add_assign(&mut self, rhs: &i16)
fn add_assign(&mut self, rhs: &i16)
+=
operation. Read moresourceimpl AddAssign<&i32> for Rational
impl AddAssign<&i32> for Rational
sourcefn add_assign(&mut self, rhs: &i32)
fn add_assign(&mut self, rhs: &i32)
+=
operation. Read moresourceimpl AddAssign<&i64> for Rational
impl AddAssign<&i64> for Rational
sourcefn add_assign(&mut self, rhs: &i64)
fn add_assign(&mut self, rhs: &i64)
+=
operation. Read moresourceimpl AddAssign<&i8> for Rational
impl AddAssign<&i8> for Rational
sourcefn add_assign(&mut self, rhs: &i8)
fn add_assign(&mut self, rhs: &i8)
+=
operation. Read moresourceimpl AddAssign<&u128> for Rational
impl AddAssign<&u128> for Rational
sourcefn add_assign(&mut self, rhs: &u128)
fn add_assign(&mut self, rhs: &u128)
+=
operation. Read moresourceimpl AddAssign<&u16> for Rational
impl AddAssign<&u16> for Rational
sourcefn add_assign(&mut self, rhs: &u16)
fn add_assign(&mut self, rhs: &u16)
+=
operation. Read moresourceimpl AddAssign<&u32> for Rational
impl AddAssign<&u32> for Rational
sourcefn add_assign(&mut self, rhs: &u32)
fn add_assign(&mut self, rhs: &u32)
+=
operation. Read moresourceimpl AddAssign<&u64> for Rational
impl AddAssign<&u64> for Rational
sourcefn add_assign(&mut self, rhs: &u64)
fn add_assign(&mut self, rhs: &u64)
+=
operation. Read moresourceimpl AddAssign<&u8> for Rational
impl AddAssign<&u8> for Rational
sourcefn add_assign(&mut self, rhs: &u8)
fn add_assign(&mut self, rhs: &u8)
+=
operation. Read moresourceimpl AddAssign<Integer> for Rational
impl AddAssign<Integer> for Rational
sourcefn add_assign(&mut self, rhs: Integer)
fn add_assign(&mut self, rhs: Integer)
+=
operation. Read moresourceimpl AddAssign<Rational> for Rational
impl AddAssign<Rational> for Rational
sourcefn add_assign(&mut self, rhs: Rational)
fn add_assign(&mut self, rhs: Rational)
+=
operation. Read moresourceimpl AddAssign<i128> for Rational
impl AddAssign<i128> for Rational
sourcefn add_assign(&mut self, rhs: i128)
fn add_assign(&mut self, rhs: i128)
+=
operation. Read moresourceimpl AddAssign<i16> for Rational
impl AddAssign<i16> for Rational
sourcefn add_assign(&mut self, rhs: i16)
fn add_assign(&mut self, rhs: i16)
+=
operation. Read moresourceimpl AddAssign<i32> for Rational
impl AddAssign<i32> for Rational
sourcefn add_assign(&mut self, rhs: i32)
fn add_assign(&mut self, rhs: i32)
+=
operation. Read moresourceimpl AddAssign<i64> for Rational
impl AddAssign<i64> for Rational
sourcefn add_assign(&mut self, rhs: i64)
fn add_assign(&mut self, rhs: i64)
+=
operation. Read moresourceimpl AddAssign<i8> for Rational
impl AddAssign<i8> for Rational
sourcefn add_assign(&mut self, rhs: i8)
fn add_assign(&mut self, rhs: i8)
+=
operation. Read moresourceimpl AddAssign<u128> for Rational
impl AddAssign<u128> for Rational
sourcefn add_assign(&mut self, rhs: u128)
fn add_assign(&mut self, rhs: u128)
+=
operation. Read moresourceimpl AddAssign<u16> for Rational
impl AddAssign<u16> for Rational
sourcefn add_assign(&mut self, rhs: u16)
fn add_assign(&mut self, rhs: u16)
+=
operation. Read moresourceimpl AddAssign<u32> for Rational
impl AddAssign<u32> for Rational
sourcefn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
+=
operation. Read moresourceimpl AddAssign<u64> for Rational
impl AddAssign<u64> for Rational
sourcefn add_assign(&mut self, rhs: u64)
fn add_assign(&mut self, rhs: u64)
+=
operation. Read moresourceimpl AddAssign<u8> for Rational
impl AddAssign<u8> for Rational
sourcefn add_assign(&mut self, rhs: u8)
fn add_assign(&mut self, rhs: u8)
+=
operation. Read moresourceimpl DivAssign<&Integer> for Rational
impl DivAssign<&Integer> for Rational
sourcefn div_assign(&mut self, rhs: &Integer)
fn div_assign(&mut self, rhs: &Integer)
/=
operation. Read moresourceimpl DivAssign<&Rational> for Rational
impl DivAssign<&Rational> for Rational
sourcefn div_assign(&mut self, rhs: &Rational)
fn div_assign(&mut self, rhs: &Rational)
/=
operation. Read moresourceimpl DivAssign<&i128> for Rational
impl DivAssign<&i128> for Rational
sourcefn div_assign(&mut self, rhs: &i128)
fn div_assign(&mut self, rhs: &i128)
/=
operation. Read moresourceimpl DivAssign<&i16> for Rational
impl DivAssign<&i16> for Rational
sourcefn div_assign(&mut self, rhs: &i16)
fn div_assign(&mut self, rhs: &i16)
/=
operation. Read moresourceimpl DivAssign<&i32> for Rational
impl DivAssign<&i32> for Rational
sourcefn div_assign(&mut self, rhs: &i32)
fn div_assign(&mut self, rhs: &i32)
/=
operation. Read moresourceimpl DivAssign<&i64> for Rational
impl DivAssign<&i64> for Rational
sourcefn div_assign(&mut self, rhs: &i64)
fn div_assign(&mut self, rhs: &i64)
/=
operation. Read moresourceimpl DivAssign<&i8> for Rational
impl DivAssign<&i8> for Rational
sourcefn div_assign(&mut self, rhs: &i8)
fn div_assign(&mut self, rhs: &i8)
/=
operation. Read moresourceimpl DivAssign<&u128> for Rational
impl DivAssign<&u128> for Rational
sourcefn div_assign(&mut self, rhs: &u128)
fn div_assign(&mut self, rhs: &u128)
/=
operation. Read moresourceimpl DivAssign<&u16> for Rational
impl DivAssign<&u16> for Rational
sourcefn div_assign(&mut self, rhs: &u16)
fn div_assign(&mut self, rhs: &u16)
/=
operation. Read moresourceimpl DivAssign<&u32> for Rational
impl DivAssign<&u32> for Rational
sourcefn div_assign(&mut self, rhs: &u32)
fn div_assign(&mut self, rhs: &u32)
/=
operation. Read moresourceimpl DivAssign<&u64> for Rational
impl DivAssign<&u64> for Rational
sourcefn div_assign(&mut self, rhs: &u64)
fn div_assign(&mut self, rhs: &u64)
/=
operation. Read moresourceimpl DivAssign<&u8> for Rational
impl DivAssign<&u8> for Rational
sourcefn div_assign(&mut self, rhs: &u8)
fn div_assign(&mut self, rhs: &u8)
/=
operation. Read moresourceimpl DivAssign<Integer> for Rational
impl DivAssign<Integer> for Rational
sourcefn div_assign(&mut self, rhs: Integer)
fn div_assign(&mut self, rhs: Integer)
/=
operation. Read moresourceimpl DivAssign<Rational> for Rational
impl DivAssign<Rational> for Rational
sourcefn div_assign(&mut self, rhs: Rational)
fn div_assign(&mut self, rhs: Rational)
/=
operation. Read moresourceimpl DivAssign<i128> for Rational
impl DivAssign<i128> for Rational
sourcefn div_assign(&mut self, rhs: i128)
fn div_assign(&mut self, rhs: i128)
/=
operation. Read moresourceimpl DivAssign<i16> for Rational
impl DivAssign<i16> for Rational
sourcefn div_assign(&mut self, rhs: i16)
fn div_assign(&mut self, rhs: i16)
/=
operation. Read moresourceimpl DivAssign<i32> for Rational
impl DivAssign<i32> for Rational
sourcefn div_assign(&mut self, rhs: i32)
fn div_assign(&mut self, rhs: i32)
/=
operation. Read moresourceimpl DivAssign<i64> for Rational
impl DivAssign<i64> for Rational
sourcefn div_assign(&mut self, rhs: i64)
fn div_assign(&mut self, rhs: i64)
/=
operation. Read moresourceimpl DivAssign<i8> for Rational
impl DivAssign<i8> for Rational
sourcefn div_assign(&mut self, rhs: i8)
fn div_assign(&mut self, rhs: i8)
/=
operation. Read moresourceimpl DivAssign<u128> for Rational
impl DivAssign<u128> for Rational
sourcefn div_assign(&mut self, rhs: u128)
fn div_assign(&mut self, rhs: u128)
/=
operation. Read moresourceimpl DivAssign<u16> for Rational
impl DivAssign<u16> for Rational
sourcefn div_assign(&mut self, rhs: u16)
fn div_assign(&mut self, rhs: u16)
/=
operation. Read moresourceimpl DivAssign<u32> for Rational
impl DivAssign<u32> for Rational
sourcefn div_assign(&mut self, rhs: u32)
fn div_assign(&mut self, rhs: u32)
/=
operation. Read moresourceimpl DivAssign<u64> for Rational
impl DivAssign<u64> for Rational
sourcefn div_assign(&mut self, rhs: u64)
fn div_assign(&mut self, rhs: u64)
/=
operation. Read moresourceimpl DivAssign<u8> for Rational
impl DivAssign<u8> for Rational
sourcefn div_assign(&mut self, rhs: u8)
fn div_assign(&mut self, rhs: u8)
/=
operation. Read moresourceimpl FromStr for Rational
impl FromStr for Rational
Parse a rational value from a string having one of the following formats, each with an optional leading sign flag:
n
, integer format, e.g. “123”n/d
, ratio format, e.g., “-12/5”z.ffff
, decimal format, e.g., “1.627”
After successfully parsing, the rational will be reduced by factoring out
common multiples of the numerator and denominators, as if Rational::reduce
was called on the value.
sourceimpl MulAssign<&Integer> for Rational
impl MulAssign<&Integer> for Rational
sourcefn mul_assign(&mut self, rhs: &Integer)
fn mul_assign(&mut self, rhs: &Integer)
*=
operation. Read moresourceimpl MulAssign<&Rational> for Rational
impl MulAssign<&Rational> for Rational
sourcefn mul_assign(&mut self, rhs: &Rational)
fn mul_assign(&mut self, rhs: &Rational)
*=
operation. Read moresourceimpl MulAssign<&i128> for Rational
impl MulAssign<&i128> for Rational
sourcefn mul_assign(&mut self, rhs: &i128)
fn mul_assign(&mut self, rhs: &i128)
*=
operation. Read moresourceimpl MulAssign<&i16> for Rational
impl MulAssign<&i16> for Rational
sourcefn mul_assign(&mut self, rhs: &i16)
fn mul_assign(&mut self, rhs: &i16)
*=
operation. Read moresourceimpl MulAssign<&i32> for Rational
impl MulAssign<&i32> for Rational
sourcefn mul_assign(&mut self, rhs: &i32)
fn mul_assign(&mut self, rhs: &i32)
*=
operation. Read moresourceimpl MulAssign<&i64> for Rational
impl MulAssign<&i64> for Rational
sourcefn mul_assign(&mut self, rhs: &i64)
fn mul_assign(&mut self, rhs: &i64)
*=
operation. Read moresourceimpl MulAssign<&i8> for Rational
impl MulAssign<&i8> for Rational
sourcefn mul_assign(&mut self, rhs: &i8)
fn mul_assign(&mut self, rhs: &i8)
*=
operation. Read moresourceimpl MulAssign<&u128> for Rational
impl MulAssign<&u128> for Rational
sourcefn mul_assign(&mut self, rhs: &u128)
fn mul_assign(&mut self, rhs: &u128)
*=
operation. Read moresourceimpl MulAssign<&u16> for Rational
impl MulAssign<&u16> for Rational
sourcefn mul_assign(&mut self, rhs: &u16)
fn mul_assign(&mut self, rhs: &u16)
*=
operation. Read moresourceimpl MulAssign<&u32> for Rational
impl MulAssign<&u32> for Rational
sourcefn mul_assign(&mut self, rhs: &u32)
fn mul_assign(&mut self, rhs: &u32)
*=
operation. Read moresourceimpl MulAssign<&u64> for Rational
impl MulAssign<&u64> for Rational
sourcefn mul_assign(&mut self, rhs: &u64)
fn mul_assign(&mut self, rhs: &u64)
*=
operation. Read moresourceimpl MulAssign<&u8> for Rational
impl MulAssign<&u8> for Rational
sourcefn mul_assign(&mut self, rhs: &u8)
fn mul_assign(&mut self, rhs: &u8)
*=
operation. Read moresourceimpl MulAssign<Integer> for Rational
impl MulAssign<Integer> for Rational
sourcefn mul_assign(&mut self, rhs: Integer)
fn mul_assign(&mut self, rhs: Integer)
*=
operation. Read moresourceimpl MulAssign<Rational> for Rational
impl MulAssign<Rational> for Rational
sourcefn mul_assign(&mut self, rhs: Rational)
fn mul_assign(&mut self, rhs: Rational)
*=
operation. Read moresourceimpl MulAssign<i128> for Rational
impl MulAssign<i128> for Rational
sourcefn mul_assign(&mut self, rhs: i128)
fn mul_assign(&mut self, rhs: i128)
*=
operation. Read moresourceimpl MulAssign<i16> for Rational
impl MulAssign<i16> for Rational
sourcefn mul_assign(&mut self, rhs: i16)
fn mul_assign(&mut self, rhs: i16)
*=
operation. Read moresourceimpl MulAssign<i32> for Rational
impl MulAssign<i32> for Rational
sourcefn mul_assign(&mut self, rhs: i32)
fn mul_assign(&mut self, rhs: i32)
*=
operation. Read moresourceimpl MulAssign<i64> for Rational
impl MulAssign<i64> for Rational
sourcefn mul_assign(&mut self, rhs: i64)
fn mul_assign(&mut self, rhs: i64)
*=
operation. Read moresourceimpl MulAssign<i8> for Rational
impl MulAssign<i8> for Rational
sourcefn mul_assign(&mut self, rhs: i8)
fn mul_assign(&mut self, rhs: i8)
*=
operation. Read moresourceimpl MulAssign<u128> for Rational
impl MulAssign<u128> for Rational
sourcefn mul_assign(&mut self, rhs: u128)
fn mul_assign(&mut self, rhs: u128)
*=
operation. Read moresourceimpl MulAssign<u16> for Rational
impl MulAssign<u16> for Rational
sourcefn mul_assign(&mut self, rhs: u16)
fn mul_assign(&mut self, rhs: u16)
*=
operation. Read moresourceimpl MulAssign<u32> for Rational
impl MulAssign<u32> for Rational
sourcefn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
*=
operation. Read moresourceimpl MulAssign<u64> for Rational
impl MulAssign<u64> for Rational
sourcefn mul_assign(&mut self, rhs: u64)
fn mul_assign(&mut self, rhs: u64)
*=
operation. Read moresourceimpl MulAssign<u8> for Rational
impl MulAssign<u8> for Rational
sourcefn mul_assign(&mut self, rhs: u8)
fn mul_assign(&mut self, rhs: u8)
*=
operation. Read moresourceimpl Ord for Rational
impl Ord for Rational
1.21.0 · sourceconst fn max(self, other: Self) -> Selfwhere
Self: Sized,
const fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourceconst fn min(self, other: Self) -> Selfwhere
Self: Sized,
const fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialEq<(Integer, Integer)> for Rational
impl PartialEq<(Integer, Integer)> for Rational
sourceimpl PartialOrd<(Integer, Integer)> for Rational
impl PartialOrd<(Integer, Integer)> for Rational
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<(i128, i128)> for Rational
impl PartialOrd<(i128, i128)> for Rational
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<(i16, i16)> for Rational
impl PartialOrd<(i16, i16)> for Rational
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<(i32, i32)> for Rational
impl PartialOrd<(i32, i32)> for Rational
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<(i64, i64)> for Rational
impl PartialOrd<(i64, i64)> for Rational
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<(i8, i8)> for Rational
impl PartialOrd<(i8, i8)> for Rational
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<(u128, u128)> for Rational
impl PartialOrd<(u128, u128)> for Rational
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<(u16, u16)> for Rational
impl PartialOrd<(u16, u16)> for Rational
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<(u32, u32)> for Rational
impl PartialOrd<(u32, u32)> for Rational
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<(u64, u64)> for Rational
impl PartialOrd<(u64, u64)> for Rational
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<(u8, u8)> for Rational
impl PartialOrd<(u8, u8)> for Rational
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Integer> for Rational
impl PartialOrd<Integer> for Rational
sourcefn partial_cmp(&self, other: &Integer) -> Option<Ordering>
fn partial_cmp(&self, other: &Integer) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for (Integer, Integer)
impl PartialOrd<Rational> for (Integer, Integer)
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for (i128, i128)
impl PartialOrd<Rational> for (i128, i128)
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for (i16, i16)
impl PartialOrd<Rational> for (i16, i16)
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for (i32, i32)
impl PartialOrd<Rational> for (i32, i32)
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for (i64, i64)
impl PartialOrd<Rational> for (i64, i64)
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for (i8, i8)
impl PartialOrd<Rational> for (i8, i8)
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for (u128, u128)
impl PartialOrd<Rational> for (u128, u128)
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for (u16, u16)
impl PartialOrd<Rational> for (u16, u16)
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for (u32, u32)
impl PartialOrd<Rational> for (u32, u32)
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for (u64, u64)
impl PartialOrd<Rational> for (u64, u64)
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for (u8, u8)
impl PartialOrd<Rational> for (u8, u8)
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for Integer
impl PartialOrd<Rational> for Integer
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for Rational
impl PartialOrd<Rational> for Rational
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for i128
impl PartialOrd<Rational> for i128
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for i16
impl PartialOrd<Rational> for i16
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for i32
impl PartialOrd<Rational> for i32
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for i64
impl PartialOrd<Rational> for i64
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for i8
impl PartialOrd<Rational> for i8
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for u128
impl PartialOrd<Rational> for u128
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for u16
impl PartialOrd<Rational> for u16
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for u32
impl PartialOrd<Rational> for u32
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for u64
impl PartialOrd<Rational> for u64
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<Rational> for u8
impl PartialOrd<Rational> for u8
sourcefn partial_cmp(&self, other: &Rational) -> Option<Ordering>
fn partial_cmp(&self, other: &Rational) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<i128> for Rational
impl PartialOrd<i128> for Rational
sourcefn partial_cmp(&self, other: &i128) -> Option<Ordering>
fn partial_cmp(&self, other: &i128) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<i16> for Rational
impl PartialOrd<i16> for Rational
sourcefn partial_cmp(&self, other: &i16) -> Option<Ordering>
fn partial_cmp(&self, other: &i16) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<i32> for Rational
impl PartialOrd<i32> for Rational
sourcefn partial_cmp(&self, other: &i32) -> Option<Ordering>
fn partial_cmp(&self, other: &i32) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<i64> for Rational
impl PartialOrd<i64> for Rational
sourcefn partial_cmp(&self, other: &i64) -> Option<Ordering>
fn partial_cmp(&self, other: &i64) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<i8> for Rational
impl PartialOrd<i8> for Rational
sourcefn partial_cmp(&self, other: &i8) -> Option<Ordering>
fn partial_cmp(&self, other: &i8) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<u128> for Rational
impl PartialOrd<u128> for Rational
sourcefn partial_cmp(&self, other: &u128) -> Option<Ordering>
fn partial_cmp(&self, other: &u128) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<u16> for Rational
impl PartialOrd<u16> for Rational
sourcefn partial_cmp(&self, other: &u16) -> Option<Ordering>
fn partial_cmp(&self, other: &u16) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<u32> for Rational
impl PartialOrd<u32> for Rational
sourcefn partial_cmp(&self, other: &u32) -> Option<Ordering>
fn partial_cmp(&self, other: &u32) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<u64> for Rational
impl PartialOrd<u64> for Rational
sourcefn partial_cmp(&self, other: &u64) -> Option<Ordering>
fn partial_cmp(&self, other: &u64) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl PartialOrd<u8> for Rational
impl PartialOrd<u8> for Rational
sourcefn partial_cmp(&self, other: &u8) -> Option<Ordering>
fn partial_cmp(&self, other: &u8) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl SubAssign<&Integer> for Rational
impl SubAssign<&Integer> for Rational
sourcefn sub_assign(&mut self, rhs: &Integer)
fn sub_assign(&mut self, rhs: &Integer)
-=
operation. Read moresourceimpl SubAssign<&Rational> for Rational
impl SubAssign<&Rational> for Rational
sourcefn sub_assign(&mut self, rhs: &Rational)
fn sub_assign(&mut self, rhs: &Rational)
-=
operation. Read moresourceimpl SubAssign<&i128> for Rational
impl SubAssign<&i128> for Rational
sourcefn sub_assign(&mut self, rhs: &i128)
fn sub_assign(&mut self, rhs: &i128)
-=
operation. Read moresourceimpl SubAssign<&i16> for Rational
impl SubAssign<&i16> for Rational
sourcefn sub_assign(&mut self, rhs: &i16)
fn sub_assign(&mut self, rhs: &i16)
-=
operation. Read moresourceimpl SubAssign<&i32> for Rational
impl SubAssign<&i32> for Rational
sourcefn sub_assign(&mut self, rhs: &i32)
fn sub_assign(&mut self, rhs: &i32)
-=
operation. Read moresourceimpl SubAssign<&i64> for Rational
impl SubAssign<&i64> for Rational
sourcefn sub_assign(&mut self, rhs: &i64)
fn sub_assign(&mut self, rhs: &i64)
-=
operation. Read moresourceimpl SubAssign<&i8> for Rational
impl SubAssign<&i8> for Rational
sourcefn sub_assign(&mut self, rhs: &i8)
fn sub_assign(&mut self, rhs: &i8)
-=
operation. Read moresourceimpl SubAssign<&u128> for Rational
impl SubAssign<&u128> for Rational
sourcefn sub_assign(&mut self, rhs: &u128)
fn sub_assign(&mut self, rhs: &u128)
-=
operation. Read moresourceimpl SubAssign<&u16> for Rational
impl SubAssign<&u16> for Rational
sourcefn sub_assign(&mut self, rhs: &u16)
fn sub_assign(&mut self, rhs: &u16)
-=
operation. Read moresourceimpl SubAssign<&u32> for Rational
impl SubAssign<&u32> for Rational
sourcefn sub_assign(&mut self, rhs: &u32)
fn sub_assign(&mut self, rhs: &u32)
-=
operation. Read moresourceimpl SubAssign<&u64> for Rational
impl SubAssign<&u64> for Rational
sourcefn sub_assign(&mut self, rhs: &u64)
fn sub_assign(&mut self, rhs: &u64)
-=
operation. Read moresourceimpl SubAssign<&u8> for Rational
impl SubAssign<&u8> for Rational
sourcefn sub_assign(&mut self, rhs: &u8)
fn sub_assign(&mut self, rhs: &u8)
-=
operation. Read moresourceimpl SubAssign<Integer> for Rational
impl SubAssign<Integer> for Rational
sourcefn sub_assign(&mut self, rhs: Integer)
fn sub_assign(&mut self, rhs: Integer)
-=
operation. Read moresourceimpl SubAssign<Rational> for Rational
impl SubAssign<Rational> for Rational
sourcefn sub_assign(&mut self, rhs: Rational)
fn sub_assign(&mut self, rhs: Rational)
-=
operation. Read moresourceimpl SubAssign<i128> for Rational
impl SubAssign<i128> for Rational
sourcefn sub_assign(&mut self, rhs: i128)
fn sub_assign(&mut self, rhs: i128)
-=
operation. Read moresourceimpl SubAssign<i16> for Rational
impl SubAssign<i16> for Rational
sourcefn sub_assign(&mut self, rhs: i16)
fn sub_assign(&mut self, rhs: i16)
-=
operation. Read moresourceimpl SubAssign<i32> for Rational
impl SubAssign<i32> for Rational
sourcefn sub_assign(&mut self, rhs: i32)
fn sub_assign(&mut self, rhs: i32)
-=
operation. Read moresourceimpl SubAssign<i64> for Rational
impl SubAssign<i64> for Rational
sourcefn sub_assign(&mut self, rhs: i64)
fn sub_assign(&mut self, rhs: i64)
-=
operation. Read moresourceimpl SubAssign<i8> for Rational
impl SubAssign<i8> for Rational
sourcefn sub_assign(&mut self, rhs: i8)
fn sub_assign(&mut self, rhs: i8)
-=
operation. Read moresourceimpl SubAssign<u128> for Rational
impl SubAssign<u128> for Rational
sourcefn sub_assign(&mut self, rhs: u128)
fn sub_assign(&mut self, rhs: u128)
-=
operation. Read moresourceimpl SubAssign<u16> for Rational
impl SubAssign<u16> for Rational
sourcefn sub_assign(&mut self, rhs: u16)
fn sub_assign(&mut self, rhs: u16)
-=
operation. Read moresourceimpl SubAssign<u32> for Rational
impl SubAssign<u32> for Rational
sourcefn sub_assign(&mut self, rhs: u32)
fn sub_assign(&mut self, rhs: u32)
-=
operation. Read moresourceimpl SubAssign<u64> for Rational
impl SubAssign<u64> for Rational
sourcefn sub_assign(&mut self, rhs: u64)
fn sub_assign(&mut self, rhs: u64)
-=
operation. Read moresourceimpl SubAssign<u8> for Rational
impl SubAssign<u8> for Rational
sourcefn sub_assign(&mut self, rhs: u8)
fn sub_assign(&mut self, rhs: u8)
-=
operation. Read more