Struct diem_types::account_state::AccountState
source · pub struct AccountState(_);
Implementations§
source§impl AccountState
impl AccountState
pub fn get_account_address(&self) -> Result<Option<AccountAddress>>
pub fn get_account_resource(&self) -> Result<Option<AccountResource>>
pub fn get_crsn_resource(&self) -> Result<Option<CRSNResource>>
pub fn get_balance_resources( &self ) -> Result<BTreeMap<Identifier, BalanceResource>>
pub fn get_preburn_balances( &self ) -> Result<BTreeMap<Identifier, PreburnResource>>
pub fn get_preburn_queue_balances( &self ) -> Result<BTreeMap<Identifier, PreburnQueueResource>>
pub fn get_chain_id_resource(&self) -> Result<Option<ChainIdResource>>
pub fn get_configuration_resource( &self ) -> Result<Option<ConfigurationResource>>
pub fn get_diem_timestamp_resource( &self ) -> Result<Option<DiemTimestampResource>>
pub fn get_validator_config_resource( &self ) -> Result<Option<ValidatorConfigResource>>
pub fn get_validator_operator_config_resource( &self ) -> Result<Option<ValidatorOperatorConfigResource>>
pub fn get_freezing_bit(&self) -> Result<Option<FreezingBit>>
pub fn get_account_role(&self) -> Result<Option<AccountRole>>
pub fn get_validator_set(&self) -> Result<Option<ValidatorSet>>
pub fn get_diem_version(&self) -> Result<Option<DiemVersion>>
pub fn get_vm_publishing_option(&self) -> Result<Option<VMPublishingOption>>
pub fn get_registered_currency_info_resources( &self ) -> Result<Vec<CurrencyInfoResource>>
pub fn get_diem_block_resource(&self) -> Result<Option<DiemBlockResource>>
pub fn get(&self, key: &[u8]) -> Option<&Vec<u8>>
pub fn get_resource_impl<T: DeserializeOwned>( &self, key: &[u8] ) -> Result<Option<T>>
pub fn insert(&mut self, key: Vec<u8>, value: Vec<u8>) -> Option<Vec<u8>>
pub fn remove(&mut self, key: &[u8]) -> Option<Vec<u8>>
pub fn iter(&self) -> impl Iterator<Item = (&Vec<u8>, &Vec<u8>)>
pub fn get_config<T: OnChainConfig>(&self) -> Result<Option<T>>
pub fn get_resource<T: MoveResource>(&self) -> Result<Option<T>>
sourcepub fn get_modules(&self) -> impl Iterator<Item = &Vec<u8>>
pub fn get_modules(&self) -> impl Iterator<Item = &Vec<u8>>
Return an iterator over the module values stored under this account
sourcepub fn get_resources(&self) -> impl Iterator<Item = (StructTag, &[u8])>
pub fn get_resources(&self) -> impl Iterator<Item = (StructTag, &[u8])>
Return an iterator over all resources stored under this account.
Note that resource access Path
s that fail to deserialize will be
silently ignored.
sourcepub fn get_resources_with_type<T: MoveResource>(
&self
) -> impl Iterator<Item = Result<(StructTag, T)>> + '_
pub fn get_resources_with_type<T: MoveResource>( &self ) -> impl Iterator<Item = Result<(StructTag, T)>> + '_
Given a particular MoveResource
, return an iterator with all instances
of that resource (there may be multiple with different generic type parameters).
Trait Implementations§
source§impl Debug for AccountState
impl Debug for AccountState
source§impl Default for AccountState
impl Default for AccountState
source§fn default() -> AccountState
fn default() -> AccountState
Returns the “default value” for a type. Read more
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 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
source§impl TryFrom<&AccountState> for AccountStateBlob
impl TryFrom<&AccountState> for AccountStateBlob
source§impl TryFrom<&AccountStateBlob> for AccountState
impl TryFrom<&AccountStateBlob> for AccountState
source§impl TryFrom<(&AccountResource, &BalanceResource)> for AccountState
impl TryFrom<(&AccountResource, &BalanceResource)> for AccountState
source§fn try_from(
(account_resource, balance_resource): (&AccountResource, &BalanceResource)
) -> Result<Self>
fn try_from( (account_resource, balance_resource): (&AccountResource, &BalanceResource) ) -> Result<Self>
Performs the conversion.
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.