pub struct BlockchainStateRef(/* private fields */);
Implementations§
Source§impl BlockchainStateRef
impl BlockchainStateRef
pub fn mut_state(&mut self) -> &mut BlockchainState
pub fn get_arc(&self) -> Arc<BlockchainState>
Methods from Deref<Target = BlockchainState>§
pub fn commit_updates(&mut self, updates: BlockchainUpdate)
pub fn account_exists(&self, address: &VMAddress) -> bool
pub fn increase_account_nonce(&mut self, address: &VMAddress)
pub fn subtract_tx_gas( &mut self, address: &VMAddress, gas_limit: u64, gas_price: u64, )
pub fn increase_validator_reward( &mut self, address: &VMAddress, amount: &BigUint, )
pub fn put_new_token_identifier(&mut self, token_identifier: String)
pub fn get_new_token_identifiers(&self) -> Vec<String>
pub fn update_new_token_identifiers(&mut self, token_identifiers: Vec<String>)
pub fn add_account(&mut self, acct: AccountData)
pub fn validate_and_add_account(&mut self, acct: AccountData)
pub fn update_accounts(&mut self, accounts: HashMap<VMAddress, AccountData>)
pub fn print_accounts(&self)
pub fn put_new_address( &mut self, creator_address: VMAddress, creator_nonce: u64, new_address: VMAddress, )
pub fn get_new_address( &self, creator_address: VMAddress, creator_nonce: u64, ) -> Option<VMAddress>
pub fn validate_account(&self, account: &AccountData)
pub fn check_account_has_code(&self, account: &AccountData) -> bool
Trait Implementations§
Source§impl Clone for BlockchainStateRef
impl Clone for BlockchainStateRef
Source§fn clone(&self) -> BlockchainStateRef
fn clone(&self) -> BlockchainStateRef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for BlockchainStateRef
impl Default for BlockchainStateRef
Source§fn default() -> BlockchainStateRef
fn default() -> BlockchainStateRef
Returns the “default value” for a type. Read more
Source§impl Deref for BlockchainStateRef
impl Deref for BlockchainStateRef
Auto Trait Implementations§
impl Freeze for BlockchainStateRef
impl RefUnwindSafe for BlockchainStateRef
impl Send for BlockchainStateRef
impl Sync for BlockchainStateRef
impl Unpin for BlockchainStateRef
impl UnwindSafe for BlockchainStateRef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more