pub struct Ratio { /* private fields */ }Implementations§
Source§impl Ratio
impl Ratio
pub fn new_i64(numerator: i64, denominator: i64) -> Self
pub fn new(numerator: Decimal, denominator: Decimal) -> Self
pub fn decimal_value( &self, scale: u32, rounding_strategy: Option<RoundingStrategy>, ) -> Decimal
pub fn reduce(self) -> Self
pub fn times(self, multiplier: Self) -> Self
pub fn times_by_big_decimal(self, multiplier: Decimal) -> Self
Trait Implementations§
Source§impl Ord for Ratio
impl Ord for Ratio
Source§impl PartialOrd for Ratio
impl PartialOrd for Ratio
impl Eq for Ratio
impl StructuralPartialEq for Ratio
Auto Trait Implementations§
impl Freeze for Ratio
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