Struct bytecode_interpreter::concrete::value::GlobalState
source · pub struct GlobalState { /* private fields */ }
Implementations§
source§impl GlobalState
impl GlobalState
sourcepub fn get_resource(
&self,
is_mut_opt: Option<bool>,
addr: AccountAddress,
key: StructInstantiation
) -> Option<TypedValue>
pub fn get_resource( &self, is_mut_opt: Option<bool>, addr: AccountAddress, key: StructInstantiation ) -> Option<TypedValue>
Get a reference to a resource from the address, return None of the resource does not exist
sourcepub fn del_resource(
&mut self,
addr: AccountAddress,
key: StructInstantiation
) -> Option<TypedValue>
pub fn del_resource( &mut self, addr: AccountAddress, key: StructInstantiation ) -> Option<TypedValue>
Remove a resource from the address, return the old resource (as struct) if exists
sourcepub fn put_resource(
&mut self,
addr: AccountAddress,
key: StructInstantiation,
object: TypedValue
) -> Option<TypedValue>
pub fn put_resource( &mut self, addr: AccountAddress, key: StructInstantiation, object: TypedValue ) -> Option<TypedValue>
Put a resource into the address, return the old resource (as struct) if exists
sourcepub fn has_resource(
&self,
addr: &AccountAddress,
key: &StructInstantiation
) -> bool
pub fn has_resource( &self, addr: &AccountAddress, key: &StructInstantiation ) -> bool
Check whether the address has a resource
sourcepub fn emit_event(&mut self, guid: Vec<u8>, seq: u64, msg: TypedValue)
pub fn emit_event(&mut self, guid: Vec<u8>, seq: u64, msg: TypedValue)
Emit an event to the event store
sourcepub fn delta(&self, old_state: &GlobalState) -> ChangeSet
pub fn delta(&self, old_state: &GlobalState) -> ChangeSet
Calculate the delta (i.e., a ChangeSet) against the old state
Trait Implementations§
source§impl Clone for GlobalState
impl Clone for GlobalState
source§fn clone(&self) -> GlobalState
fn clone(&self) -> GlobalState
Returns a copy 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 Debug for GlobalState
impl Debug for GlobalState
source§impl Default for GlobalState
impl Default for GlobalState
source§fn default() -> GlobalState
fn default() -> GlobalState
Returns the “default value” for a type. Read more
source§impl PartialEq<GlobalState> for GlobalState
impl PartialEq<GlobalState> for GlobalState
source§fn eq(&self, other: &GlobalState) -> bool
fn eq(&self, other: &GlobalState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for GlobalState
impl StructuralEq for GlobalState
impl StructuralPartialEq for GlobalState
Auto Trait Implementations§
impl RefUnwindSafe for GlobalState
impl Send for GlobalState
impl Sync for GlobalState
impl Unpin for GlobalState
impl UnwindSafe for GlobalState
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.