Struct aptos_types::account_state::AccountState
source · [−]pub struct AccountState(_);Implementations
sourceimpl AccountState
impl AccountState
pub fn get(&self, key: &[u8]) -> Option<&Vec<u8>>
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 into_resource_iter(self) -> impl Iterator<Item = (Vec<u8>, Vec<u8>)>
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 into_modules(self) -> impl Iterator<Item = Vec<u8>>
pub fn into_modules(self) -> impl Iterator<Item = Vec<u8>>
Into 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 Paths that fail to deserialize will be
silently ignored.
pub fn from_access_paths_and_values(
key_value_map: &HashMap<StateKey, StateValue>
) -> Result<Option<Self>>
Trait Implementations
sourceimpl AccountView for AccountState
impl AccountView for AccountState
fn get_state_value(&self, _: &StateKey) -> Result<Option<Vec<u8>>>
fn get_account_address(&self) -> Result<Option<AccountAddress>>
fn get_resource_impl<T: DeserializeOwned>(
&self,
path: Vec<u8>
) -> Result<Option<T>>
fn get_validator_set(&self) -> Result<Option<ValidatorSet>>
fn get_configuration_resource(&self) -> Result<Option<ConfigurationResource>>
fn get_move_resource<T: MoveResource>(&self) -> Result<Option<T>>
fn get_validator_config_resource(&self) -> Result<Option<ValidatorConfig>>
fn get_validator_operator_config_resource(
&self
) -> Result<Option<ValidatorOperatorConfigResource>>
fn get_on_chain_config<T: OnChainConfig>(&self) -> Result<Option<T>>
fn get_version(&self) -> Result<Option<Version>>
fn get_resource<T: MoveResource>(&self) -> Result<Option<T>>
fn get_chain_id_resource(&self) -> Result<Option<ChainIdResource>>
fn get_crsn_resource(&self) -> Result<Option<CRSNResource>>
fn get_coin_store_resource(&self) -> Result<Option<CoinStoreResource>>
fn get_state_key_for_path(&self, path: Vec<u8>) -> Result<StateKey>
fn get_account_resource(&self) -> Result<Option<AccountResource>>
fn get_config<T: OnChainConfig>(&self) -> Result<Option<T>>
sourceimpl Clone for AccountState
impl Clone for AccountState
sourcefn clone(&self) -> AccountState
fn clone(&self) -> AccountState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for AccountState
impl Debug for AccountState
sourceimpl Default for AccountState
impl Default for AccountState
sourcefn default() -> AccountState
fn default() -> AccountState
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for AccountState
impl<'de> Deserialize<'de> for AccountState
sourcefn 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
sourceimpl PartialEq<AccountState> for AccountState
impl PartialEq<AccountState> for AccountState
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &AccountState) -> bool
fn ne(&self, other: &AccountState) -> bool
This method tests for !=.
sourceimpl Serialize for AccountState
impl Serialize for AccountState
sourceimpl TryFrom<&HashMap<StateKey, StateValue, RandomState>> for AccountState
impl TryFrom<&HashMap<StateKey, StateValue, RandomState>> for AccountState
sourceimpl TryFrom<&StateValue> for AccountState
impl TryFrom<&StateValue> for AccountState
sourceimpl TryFrom<(&AccountResource, &CoinStoreResource)> for AccountState
impl TryFrom<(&AccountResource, &CoinStoreResource)> for AccountState
sourcefn try_from(
(account_resource, balance_resource): (&AccountResource, &CoinStoreResource)
) -> Result<Self>
fn try_from(
(account_resource, balance_resource): (&AccountResource, &CoinStoreResource)
) -> Result<Self>
Performs the conversion.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
sourcefn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more