Struct jormungandr_lib::interfaces::AccountState
source · pub struct AccountState {
delegation: DelegationType,
value: Value,
counters: [u32; 8],
tokens: BTreeMap<TokenIdentifier, Value>,
last_rewards: LastRewards,
}
Expand description
represent the current state of an account in the ledger
This type is different from the UTxOInfo
which represents another
kind of mean to manipulate assets in the blockchain.
Fields§
§delegation: DelegationType
§value: Value
§counters: [u32; 8]
§tokens: BTreeMap<TokenIdentifier, Value>
§last_rewards: LastRewards
Implementations§
source§impl AccountState
impl AccountState
sourcepub fn delegation(&self) -> &DelegationType
pub fn delegation(&self) -> &DelegationType
retrieve the identifier to the stake pool this account is delegating its stake to.
None
means this account is not delegating its stake.
sourcepub fn counters(&self) -> [u32; 8]
pub fn counters(&self) -> [u32; 8]
The transaction counters for spending lanes. A counter in one of the existing lanes is used as part of the parameter when adding a new account input to a transaction.
sourcepub fn last_rewards(&self) -> &LastRewards
pub fn last_rewards(&self) -> &LastRewards
the last rewards transfered to account
sourcepub fn tokens(&self) -> &BTreeMap<TokenIdentifier, Value>
pub fn tokens(&self) -> &BTreeMap<TokenIdentifier, Value>
the current tokens associated to this account
Trait Implementations§
source§impl Clone for AccountState
impl Clone for AccountState
source§fn clone(&self) -> AccountState
fn clone(&self) -> AccountState
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 Debug for AccountState
impl Debug for AccountState
source§impl<'de> Deserialize<'de> for AccountState
impl<'de> Deserialize<'de> for AccountState
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, E> From<&'a AccountState<E>> for AccountState
impl<'a, E> From<&'a AccountState<E>> for AccountState
source§impl<E> From<AccountState<E>> for AccountState
impl<E> From<AccountState<E>> for AccountState
source§impl PartialEq<AccountState> for AccountState
impl PartialEq<AccountState> for AccountState
source§fn eq(&self, other: &AccountState) -> bool
fn eq(&self, other: &AccountState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for AccountState
impl Serialize for AccountState
impl Eq for AccountState
impl StructuralEq for AccountState
impl StructuralPartialEq for AccountState
Auto Trait Implementations§
impl RefUnwindSafe for AccountState
impl Send for AccountState
impl Sync for AccountState
impl Unpin for AccountState
impl UnwindSafe for AccountState
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