pub struct MoneyTool;Implementations§
Source§impl MoneyTool
impl MoneyTool
pub fn new() -> Self
pub fn of(&self, amount_str: &str, currency_code: &str) -> Result<Money>
pub fn zero(&self, currency_code: &str) -> Result<Money>
pub fn same_currency(&self, a: &Money, b: &Money) -> bool
pub fn add(&self, a: &Money, b: &Money) -> Result<Money>
pub fn sub(&self, a: &Money, b: &Money) -> Result<Money>
pub fn mul(&self, a: &Money, multiplier: Decimal) -> Result<Money>
pub fn div(&self, a: &Money, divisor: Decimal) -> Result<Money>
pub fn round(&self, a: &Money) -> Result<Money>
pub fn allocate(&self, a: &Money, ratios: Vec<u32>) -> Result<Vec<Money>>
pub fn format(&self, a: &Money) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MoneyTool
impl RefUnwindSafe for MoneyTool
impl Send for MoneyTool
impl Sync for MoneyTool
impl Unpin for MoneyTool
impl UnsafeUnpin for MoneyTool
impl UnwindSafe for MoneyTool
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