pub struct Rational {
pub num: i32,
pub den: i32,
}Expand description
A rational number num / den.
Fields§
§num: i32§den: i32Implementations§
Trait Implementations§
impl Copy for Rational
Source§impl Default for Rational
Defaults to 0/1 (not the derive’s 0/0, which would be a divide-by-zero
trap waiting to happen).
impl Default for Rational
Defaults to 0/1 (not the derive’s 0/0, which would be a divide-by-zero
trap waiting to happen).
impl Eq 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