pub struct TokenTotals(Hamt<DefaultHasher, TokenIdentifier, Value>);
Tuple Fields§
§0: Hamt<DefaultHasher, TokenIdentifier, Value>
Implementations§
source§impl TokenTotals
impl TokenTotals
pub fn add( &self, token: TokenIdentifier, value: Value ) -> Result<TokenTotals, Error>
pub fn get_total(&self, token: &TokenIdentifier) -> Option<Value>
Trait Implementations§
source§impl Clone for TokenTotals
impl Clone for TokenTotals
source§fn clone(&self) -> TokenTotals
fn clone(&self) -> TokenTotals
Returns a copy 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 Default for TokenTotals
impl Default for TokenTotals
source§fn default() -> TokenTotals
fn default() -> TokenTotals
Returns the “default value” for a type. Read more
source§impl PartialEq<TokenTotals> for TokenTotals
impl PartialEq<TokenTotals> for TokenTotals
source§fn eq(&self, other: &TokenTotals) -> bool
fn eq(&self, other: &TokenTotals) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for TokenTotals
impl StructuralEq for TokenTotals
impl StructuralPartialEq for TokenTotals
Auto Trait Implementations§
impl RefUnwindSafe for TokenTotals
impl Send for TokenTotals
impl Sync for TokenTotals
impl Unpin for TokenTotals
impl UnwindSafe for TokenTotals
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