pub struct BalanceDiffs(/* private fields */);Expand description
Records a balance differences to apply to addresses.
Implementations§
Source§impl BalanceDiffs
impl BalanceDiffs
Sourcepub fn get(&self, address: &Address) -> Option<&BalanceDiff>
pub fn get(&self, address: &Address) -> Option<&BalanceDiff>
Gets the BalanceDiff of a given address.
Sourcepub fn output_add(&mut self, output: &Output) -> Result<(), Error>
pub fn output_add(&mut self, output: &Output) -> Result<(), Error>
Adds an output to a BalanceDiffs.
Sourcepub fn output_sub(&mut self, output: &Output) -> Result<(), Error>
pub fn output_sub(&mut self, output: &Output) -> Result<(), Error>
Subtracts an output from a BalanceDiffs`.
Sourcepub fn amount_add(&mut self, address: Address, amount: u64) -> Result<(), Error>
pub fn amount_add(&mut self, address: Address, amount: u64) -> Result<(), Error>
Adds a given amount to a given address.
Sourcepub fn amount_sub(&mut self, address: Address, amount: u64) -> Result<(), Error>
pub fn amount_sub(&mut self, address: Address, amount: u64) -> Result<(), Error>
Subtracts a given amount from a given address.
Sourcepub fn dust_allowance_add(
&mut self,
address: Address,
amount: u64,
) -> Result<(), Error>
pub fn dust_allowance_add( &mut self, address: Address, amount: u64, ) -> Result<(), Error>
Adds a given dust allowance to a given address.
Sourcepub fn dust_allowance_sub(
&mut self,
address: Address,
amount: u64,
) -> Result<(), Error>
pub fn dust_allowance_sub( &mut self, address: Address, amount: u64, ) -> Result<(), Error>
Subtracts a given dust allowance from a given address.
Sourcepub fn dust_outputs_inc(&mut self, address: Address) -> Result<(), Error>
pub fn dust_outputs_inc(&mut self, address: Address) -> Result<(), Error>
Increments the number of dust outputs of a given address.
Sourcepub fn dust_outputs_dec(&mut self, address: Address) -> Result<(), Error>
pub fn dust_outputs_dec(&mut self, address: Address) -> Result<(), Error>
Decrements the number of dust outputs of a given address.
Sourcepub fn iter(&self) -> Iter<'_, Address, BalanceDiff>
pub fn iter(&self) -> Iter<'_, Address, BalanceDiff>
Creates an iterator over the balance diffs.
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, Address, BalanceDiff>
pub fn iter_mut(&mut self) -> IterMut<'_, Address, BalanceDiff>
Creates a mutable iterator over the balance diffs.
Trait Implementations§
Source§impl Clone for BalanceDiffs
impl Clone for BalanceDiffs
Source§fn clone(&self) -> BalanceDiffs
fn clone(&self) -> BalanceDiffs
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BalanceDiffs
impl Debug for BalanceDiffs
Source§impl Default for BalanceDiffs
impl Default for BalanceDiffs
Source§fn default() -> BalanceDiffs
fn default() -> BalanceDiffs
Returns the “default value” for a type. Read more
Source§impl IntoIterator for BalanceDiffs
impl IntoIterator for BalanceDiffs
Auto Trait Implementations§
impl Freeze for BalanceDiffs
impl RefUnwindSafe for BalanceDiffs
impl Send for BalanceDiffs
impl Sync for BalanceDiffs
impl Unpin for BalanceDiffs
impl UnwindSafe for BalanceDiffs
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