pub struct Balance<'ctx> { /* private fields */ }
Expand description
Accumulated balance of accounts.
Implementations§
Source§impl<'ctx> Balance<'ctx>
impl<'ctx> Balance<'ctx>
Sourcepub fn add_amount(
&mut self,
account: Account<'ctx>,
amount: Amount<'ctx>,
) -> &Amount<'ctx>
pub fn add_amount( &mut self, account: Account<'ctx>, amount: Amount<'ctx>, ) -> &Amount<'ctx>
Adds a particular account value, and returns the updated balance.
Sourcepub fn get(&self, account: &Account<'ctx>) -> Option<&Amount<'ctx>>
pub fn get(&self, account: &Account<'ctx>) -> Option<&Amount<'ctx>>
Gets the balance of the given account.
Sourcepub fn round(&mut self, ctx: &ReportContext<'ctx>)
pub fn round(&mut self, ctx: &ReportContext<'ctx>)
Rounds the balance following the context.
Trait Implementations§
impl<'ctx> Eq for Balance<'ctx>
impl<'ctx> StructuralPartialEq for Balance<'ctx>
Auto Trait Implementations§
impl<'ctx> Freeze for Balance<'ctx>
impl<'ctx> RefUnwindSafe for Balance<'ctx>
impl<'ctx> Send for Balance<'ctx>
impl<'ctx> Sync for Balance<'ctx>
impl<'ctx> Unpin for Balance<'ctx>
impl<'ctx> UnwindSafe for Balance<'ctx>
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