[−][src]Struct exonum_rust_runtime::ExecutionContext
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]
I: Into<InstanceQuery<'a>>,
type Output = Result<(), ExecutionError>
Type of values output by the stub.
fn generic_call_mut(
&mut self,
called_instance: I,
method: MethodDescriptor,
args: Vec<u8>
) -> Self::Output
[src]
&mut self,
called_instance: I,
method: MethodDescriptor,
args: Vec<u8>
) -> Self::Output
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,