Struct diem_sdk::types::account_state::AccountState
pub struct AccountState(_);
Implementations§
§impl AccountState
impl AccountState
pub fn get_account_address(&self) -> Result<Option<AccountAddress>, Error>
pub fn get_account_resource(&self) -> Result<Option<AccountResource>, Error>
pub fn get_crsn_resource(&self) -> Result<Option<CRSNResource>, Error>
pub fn get_balance_resources( &self ) -> Result<BTreeMap<Identifier, BalanceResource, Global>, Error>
pub fn get_preburn_balances( &self ) -> Result<BTreeMap<Identifier, PreburnResource, Global>, Error>
pub fn get_preburn_queue_balances( &self ) -> Result<BTreeMap<Identifier, PreburnQueueResource, Global>, Error>
pub fn get_chain_id_resource(&self) -> Result<Option<ChainIdResource>, Error>
pub fn get_configuration_resource( &self ) -> Result<Option<ConfigurationResource>, Error>
pub fn get_diem_timestamp_resource( &self ) -> Result<Option<DiemTimestampResource>, Error>
pub fn get_validator_config_resource( &self ) -> Result<Option<ValidatorConfigResource>, Error>
pub fn get_validator_operator_config_resource( &self ) -> Result<Option<ValidatorOperatorConfigResource>, Error>
pub fn get_freezing_bit(&self) -> Result<Option<FreezingBit>, Error>
pub fn get_account_role(&self) -> Result<Option<AccountRole>, Error>
pub fn get_validator_set(&self) -> Result<Option<ValidatorSet>, Error>
pub fn get_diem_version(&self) -> Result<Option<DiemVersion>, Error>
pub fn get_vm_publishing_option( &self ) -> Result<Option<VMPublishingOption>, Error>
pub fn get_registered_currency_info_resources( &self ) -> Result<Vec<CurrencyInfoResource, Global>, Error>
pub fn get_diem_block_resource( &self ) -> Result<Option<DiemBlockResource>, Error>
pub fn get(&self, key: &[u8]) -> Option<&Vec<u8, Global>>
pub fn get_resource_impl<T>(&self, key: &[u8]) -> Result<Option<T>, Error>where T: DeserializeOwned,
pub fn insert( &mut self, key: Vec<u8, Global>, value: Vec<u8, Global> ) -> Option<Vec<u8, Global>>
pub fn remove(&mut self, key: &[u8]) -> Option<Vec<u8, Global>>
pub fn iter(&self) -> impl Iterator<Item = (&Vec<u8, Global>, &Vec<u8, Global>)>
pub fn get_config<T>(&self) -> Result<Option<T>, Error>where T: OnChainConfig,
pub fn get_resource<T>(&self) -> Result<Option<T>, Error>where T: MoveResource,
pub fn get_modules(&self) -> impl Iterator<Item = &Vec<u8, Global>>
pub fn get_modules(&self) -> impl Iterator<Item = &Vec<u8, Global>>
Return an iterator over the module values stored under this account
pub 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.
pub fn get_resources_with_type<T>(
&self
) -> impl Iterator<Item = Result<(StructTag, T), Error>>where
T: MoveResource,
pub fn get_resources_with_type<T>( &self ) -> impl Iterator<Item = Result<(StructTag, T), Error>>where T: MoveResource,
Given a particular MoveResource
, return an iterator with all instances
of that resource (there may be multiple with different generic type parameters).
Trait Implementations§
§impl Debug for AccountState
impl Debug for AccountState
§impl Default for AccountState
impl Default for AccountState
§fn default() -> AccountState
fn default() -> AccountState
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for AccountState
impl<'de> Deserialize<'de> for AccountState
§fn deserialize<__D>(
__deserializer: __D
) -> Result<AccountState, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<AccountState, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq<AccountState> for AccountState
impl PartialEq<AccountState> for AccountState
§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 ==
.§impl Serialize for AccountState
impl Serialize for AccountState
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl TryFrom<&AccountState> for AccountStateBlob
impl TryFrom<&AccountState> for AccountStateBlob
§fn try_from(account_state: &AccountState) -> Result<AccountStateBlob, Error>
fn try_from(account_state: &AccountState) -> Result<AccountStateBlob, Error>
Performs the conversion.
§impl TryFrom<&AccountStateBlob> for AccountState
impl TryFrom<&AccountStateBlob> for AccountState
§fn try_from(
account_state_blob: &AccountStateBlob
) -> Result<AccountState, Error>
fn try_from( account_state_blob: &AccountStateBlob ) -> Result<AccountState, Error>
Performs the conversion.
§impl TryFrom<(&AccountResource, &BalanceResource)> for AccountState
impl TryFrom<(&AccountResource, &BalanceResource)> for AccountState
§fn try_from(
_: (&AccountResource, &BalanceResource)
) -> Result<AccountState, Error>
fn try_from( _: (&AccountResource, &BalanceResource) ) -> Result<AccountState, Error>
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.