pub struct AccountState(_);

Implementations§

§

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>>

Return an iterator over the module values stored under this account

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.

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

§

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

Formats the value using the given formatter. Read more
§

impl Default for AccountState

§

fn default() -> AccountState

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

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

§

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

§

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.
§

impl Serialize for AccountState

§

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

§

type Error = Error

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

fn try_from(account_state: &AccountState) -> Result<AccountStateBlob, Error>

Performs the conversion.
§

impl TryFrom<&AccountStateBlob> for AccountState

§

type Error = Error

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

fn try_from( account_state_blob: &AccountStateBlob ) -> Result<AccountState, Error>

Performs the conversion.
§

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

§

type Error = Error

The type returned in the event of a conversion 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§

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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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
§

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

§

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> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

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