pub struct AccountState(_);

Implementations§

source§

impl AccountState

source

pub fn get_account_address(&self) -> Result<Option<AccountAddress>>

source

pub fn get_account_resource(&self) -> Result<Option<AccountResource>>

source

pub fn get_crsn_resource(&self) -> Result<Option<CRSNResource>>

source

pub fn get_balance_resources( &self ) -> Result<BTreeMap<Identifier, BalanceResource>>

source

pub fn get_preburn_balances( &self ) -> Result<BTreeMap<Identifier, PreburnResource>>

source

pub fn get_preburn_queue_balances( &self ) -> Result<BTreeMap<Identifier, PreburnQueueResource>>

source

pub fn get_chain_id_resource(&self) -> Result<Option<ChainIdResource>>

source

pub fn get_configuration_resource( &self ) -> Result<Option<ConfigurationResource>>

source

pub fn get_diem_timestamp_resource( &self ) -> Result<Option<DiemTimestampResource>>

source

pub fn get_validator_config_resource( &self ) -> Result<Option<ValidatorConfigResource>>

source

pub fn get_validator_operator_config_resource( &self ) -> Result<Option<ValidatorOperatorConfigResource>>

source

pub fn get_freezing_bit(&self) -> Result<Option<FreezingBit>>

source

pub fn get_account_role(&self) -> Result<Option<AccountRole>>

source

pub fn get_validator_set(&self) -> Result<Option<ValidatorSet>>

source

pub fn get_diem_version(&self) -> Result<Option<DiemVersion>>

source

pub fn get_vm_publishing_option(&self) -> Result<Option<VMPublishingOption>>

source

pub fn get_registered_currency_info_resources( &self ) -> Result<Vec<CurrencyInfoResource>>

source

pub fn get_diem_block_resource(&self) -> Result<Option<DiemBlockResource>>

source

pub fn get(&self, key: &[u8]) -> Option<&Vec<u8>>

source

pub fn get_resource_impl<T: DeserializeOwned>( &self, key: &[u8] ) -> Result<Option<T>>

source

pub fn insert(&mut self, key: Vec<u8>, value: Vec<u8>) -> Option<Vec<u8>>

source

pub fn remove(&mut self, key: &[u8]) -> Option<Vec<u8>>

source

pub fn iter(&self) -> impl Iterator<Item = (&Vec<u8>, &Vec<u8>)>

source

pub fn get_config<T: OnChainConfig>(&self) -> Result<Option<T>>

source

pub fn get_resource<T: MoveResource>(&self) -> Result<Option<T>>

source

pub fn get_modules(&self) -> impl Iterator<Item = &Vec<u8>>

Return an iterator over the module values stored under this account

source

pub fn get_resources(&self) -> impl Iterator<Item = (StructTag, &[u8])>

Return an iterator over all resources stored under this account.

Note that resource access Paths that fail to deserialize will be silently ignored.

source

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

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountState

source§

fn default() -> AccountState

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountState

source§

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

source§

fn eq(&self, other: &AccountState) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountState

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<&AccountState> for AccountStateBlob

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(account_state: &AccountState) -> Result<Self>

Performs the conversion.
source§

impl TryFrom<&AccountStateBlob> for AccountState

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(account_state_blob: &AccountStateBlob) -> Result<Self>

Performs the conversion.
source§

impl TryFrom<(&AccountResource, &BalanceResource)> for AccountState

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from( (account_resource, balance_resource): (&AccountResource, &BalanceResource) ) -> Result<Self>

Performs the conversion.
source§

impl Eq for AccountState

source§

impl StructuralEq for AccountState

source§

impl StructuralPartialEq for AccountState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,

source§

fn test_only_hash(&self) -> HashValue

Generates a hash used only for tests.
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,