[][src]Struct exonum_rust_runtime::AfterCommitContext

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

Provide context for the after_commit handler.

Methods

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

pub fn data(&self) -> BlockchainData<&'a dyn Snapshot>[src]

Returns blockchain data for the snapshot associated with this context.

pub fn service_data(&self) -> Prefixed<&'a dyn Snapshot>[src]

Returns snapshot of the data for the executing service.

pub fn height(&self) -> Height[src]

Returns a current blockchain height. This height is "height of the latest committed block".

pub fn service_key(&self) -> PublicKey[src]

Returns the service key of this node.

pub fn validator_id(&self) -> Option<ValidatorId>[src]

Returns the ID of this node as a validator. If the node is not a validator, returns None.

pub fn status(&self) -> &InstanceStatus[src]

Returns the current status of the service.

pub fn broadcaster(&self) -> Option<Broadcaster>[src]

Returns a transaction broadcaster if the current node is a validator and the service is active (i.e., can process transactions). If these conditions do not hold, returns None.

pub fn generic_broadcaster(&self) -> Broadcaster[src]

Returns a transaction broadcaster regardless of the node status (validator or auditor) and the service status (active or not).

Safety

Transactions for non-active services will not be broadcast successfully; they will be filtered on the receiving nodes as ones that cannot (currently) be processed.

Trait Implementations

impl<'_> Debug for AfterCommitContext<'_>[src]

Auto Trait Implementations

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

impl<'a> Send for AfterCommitContext<'a>

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

impl<'a> Unpin for AfterCommitContext<'a>

impl<'a> !UnwindSafe for AfterCommitContext<'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>,