pub struct ExecutionContext {
pub instance_id: InstanceId,
pub instance_address: Address,
pub caller_address: Address,
pub deposited_tokens: Vec<BaseUnits>,
pub read_only: bool,
pub call_format: CallFormat,
}
Expand description
Execution context.
Contains information that is useful on most invocations as it is always included without requiring any explicit queries.
Fields§
§instance_id: InstanceId
Contract instance identifier.
instance_address: Address
Contract instance address.
caller_address: Address
Caller address.
deposited_tokens: Vec<BaseUnits>
Tokens deposited by the caller.
read_only: bool
Read-only flag.
A read-only call cannot make any changes to runtime state. Any attempt at modifying state will result in the call failing.
call_format: CallFormat
Transaction’s call format.
Trait Implementations§
source§impl Debug for ExecutionContext
impl Debug for ExecutionContext
source§impl Decode for ExecutionContext
impl Decode for ExecutionContext
source§fn try_default() -> Result<Self, DecodeError>
fn try_default() -> Result<Self, DecodeError>
Try to decode from a missing/null/undefined value.
source§fn try_from_cbor_value(value: Value) -> Result<Self, DecodeError>
fn try_from_cbor_value(value: Value) -> Result<Self, DecodeError>
Try to decode from a given CBOR value.
§fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
Try to decode from a given CBOR value, calling
try_default
in case the value is null or
undefined.source§impl Default for ExecutionContext
impl Default for ExecutionContext
source§fn default() -> ExecutionContext
fn default() -> ExecutionContext
Returns the “default value” for a type. Read more
source§impl Encode for ExecutionContext
impl Encode for ExecutionContext
source§impl EncodeAsMap for ExecutionContext
impl EncodeAsMap for ExecutionContext
§fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
Encode the type into a CBOR Map.
§fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
Encode the type into a CBOR Map, returning the map items.
Auto Trait Implementations§
impl Freeze for ExecutionContext
impl RefUnwindSafe for ExecutionContext
impl Send for ExecutionContext
impl Sync for ExecutionContext
impl Unpin for ExecutionContext
impl UnwindSafe for ExecutionContext
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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