Trait oasis_runtime_sdk::context::BatchContext
source · 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§
sourcefn with_tx<F, Rs>(&mut self, tx: TransactionWithMeta, f: F) -> Rswhere
F: FnOnce(RuntimeTxContext<'_, '_, <Self as Context>::Runtime>, Call) -> Rs,
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.
sourcefn emit_messages(
&mut self,
msgs: Vec<(Message, MessageEventHookInvocation)>
) -> Result<(), Error>
fn emit_messages( &mut self, msgs: Vec<(Message, MessageEventHookInvocation)> ) -> Result<(), Error>
Emit consensus messages.