pub trait BatchContext: Context {
    // Required methods
    fn with_tx<F, Rs>(&mut self, tx: TransactionWithMeta, f: F) -> Rs
       where F: FnOnce(RuntimeTxContext<'_, '_, <Self as Context>::Runtime>, Call) -> Rs;
    fn emit_messages(
        &mut self,
        msgs: Vec<(Message, MessageEventHookInvocation)>
    ) -> Result<(), Error>;
}
Expand description

Runtime SDK batch-wide context.

Required Methods§

source

fn with_tx<F, Rs>(&mut self, tx: TransactionWithMeta, f: F) -> Rswhere F: FnOnce(RuntimeTxContext<'_, '_, <Self as Context>::Runtime>, Call) -> Rs,

Executes a function in a per-transaction context.

source

fn emit_messages( &mut self, msgs: Vec<(Message, MessageEventHookInvocation)> ) -> Result<(), Error>

Emit consensus messages.

Implementors§