pub struct TokenDistribution<'a, T: Clone + PartialEq + Eq> {
token_totals: &'a TokenTotals,
account_ledger: &'a Ledger,
token: &'a T,
}
Fields§
§token_totals: &'a TokenTotals
§account_ledger: &'a Ledger
§token: &'a T
Implementations§
source§impl<'a> TokenDistribution<'a, ()>
impl<'a> TokenDistribution<'a, ()>
pub fn new(token_totals: &'a TokenTotals, account_ledger: &'a Ledger) -> Self
pub fn token( self, token: &'a TokenIdentifier ) -> TokenDistribution<'_, TokenIdentifier>
source§impl<'a> TokenDistribution<'a, TokenIdentifier>
impl<'a> TokenDistribution<'a, TokenIdentifier>
pub fn get_total(&self) -> Value
pub fn get_account( &self, account: &Identifier ) -> Result<Option<Value>, LedgerError>
Trait Implementations§
source§impl Clone for TokenDistribution<'_, ()>
impl Clone for TokenDistribution<'_, ()>
source§impl<'a, T: PartialEq + Clone + PartialEq + Eq> PartialEq<TokenDistribution<'a, T>> for TokenDistribution<'a, T>
impl<'a, T: PartialEq + Clone + PartialEq + Eq> PartialEq<TokenDistribution<'a, T>> for TokenDistribution<'a, T>
source§fn eq(&self, other: &TokenDistribution<'a, T>) -> bool
fn eq(&self, other: &TokenDistribution<'a, T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a, T: Eq + Clone + PartialEq + Eq> Eq for TokenDistribution<'a, T>
impl<'a, T: Clone + PartialEq + Eq> StructuralEq for TokenDistribution<'a, T>
impl<'a, T: Clone + PartialEq + Eq> StructuralPartialEq for TokenDistribution<'a, T>
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for TokenDistribution<'a, T>where T: RefUnwindSafe,
impl<'a, T> Send for TokenDistribution<'a, T>where T: Sync,
impl<'a, T> Sync for TokenDistribution<'a, T>where T: Sync,
impl<'a, T> Unpin for TokenDistribution<'a, T>
impl<'a, T> UnwindSafe for TokenDistribution<'a, T>where T: RefUnwindSafe,
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