pub struct Ratio {
pub num: usize,
pub den: usize,
}
Expand description
Simple ratio structure since stdlib lacks one.
Fields§
§num: usize
Numerator.
den: usize
Denominator.
Implementations§
Trait Implementations§
impl Copy for Ratio
Auto Trait Implementations§
impl RefUnwindSafe for Ratio
impl Send for Ratio
impl Sync for Ratio
impl Unpin for Ratio
impl UnwindSafe for Ratio
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