[][src]Struct exonum_rust_runtime::ExecutionContext

pub struct ExecutionContext<'a> { /* fields omitted */ }

Provides the current state of the blockchain and the caller information for the call which is being executed.

The call can mean a transaction call, before_transactions / after_transactions hook, or the service constructor invocation.

Methods

impl<'a> ExecutionContext<'a>[src]

pub const MAX_CALL_STACK_DEPTH: u64[src]

Maximum depth of the call stack.

pub fn transaction_hash(&self) -> Option<Hash>[src]

Returns the hash of the currently executing transaction, or None for non-transaction root calls (e.g., before_transactions / after_transactions service hooks).

pub fn data(&self) -> BlockchainData<&Fork>[src]

Provides access to blockchain data.

pub fn service_data(&self) -> Prefixed<&Fork>[src]

Provides access to the data of the executing service.

pub fn caller(&self) -> &Caller[src]

Returns the authorization information about this call.

pub fn instance(&self) -> &InstanceDescriptor[src]

Returns a descriptor of the executing service instance.

pub fn in_genesis_block(&self) -> bool[src]

Returns true if currently processed block is a genesis block.

pub fn interface_name(&self) -> &str[src]

Returns an identifier of the service interface required for the call. This identifier is always empty for the primary service interface.

Stability

This getter is a part of an unfinished "interfaces" feature. It is exempt from semantic versioning and will be replaced in the future releases.

Trait Implementations

impl<'a> Debug for ExecutionContext<'a>[src]

impl<'a, I> GenericCallMut<I> for ExecutionContext<'a> where
    I: Into<InstanceQuery<'a>>, 
[src]

type Output = Result<(), ExecutionError>

Type of values output by the stub.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for ExecutionContext<'a>

impl<'a> !Send for ExecutionContext<'a>

impl<'a> !Sync for ExecutionContext<'a>

impl<'a> Unpin for ExecutionContext<'a>

impl<'a> !UnwindSafe for ExecutionContext<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,