Struct Rational
pub struct Rational {
pub numer: i64,
pub denom: i64,
}Fields§
§numer: i64§denom: i64Implementations§
Trait Implementations§
§impl AddAssign for Rational
impl AddAssign for Rational
§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreimpl Copy for Rational
§impl DivAssign<i64> for Rational
impl DivAssign<i64> for Rational
§fn div_assign(&mut self, rhs: i64)
fn div_assign(&mut self, rhs: i64)
Performs the
/= operation. Read moreimpl Eq for Rational
§impl MulAssign<i64> for Rational
impl MulAssign<i64> for Rational
§fn mul_assign(&mut self, rhs: i64)
fn mul_assign(&mut self, rhs: i64)
Performs the
*= operation. Read more§impl Ord for Rational
impl Ord for Rational
1.21.0 (const: unstable) · Source§fn 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 (const: unstable) · Source§fn 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
§impl PartialOrd for Rational
impl PartialOrd for Rational
impl StructuralPartialEq for Rational
Auto Trait Implementations§
impl Freeze for Rational
impl RefUnwindSafe for Rational
impl Send for Rational
impl Sync for Rational
impl Unpin for Rational
impl UnsafeUnpin for Rational
impl UnwindSafe for Rational
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more