Struct oasis_runtime_sdk::context::RuntimeBatchContext
source · pub struct RuntimeBatchContext<'a, R: Runtime> { /* private fields */ }
Expand description
Dispatch context for the whole batch.
Implementations§
source§impl<'a, R: Runtime> RuntimeBatchContext<'a, R>
impl<'a, R: Runtime> RuntimeBatchContext<'a, R>
sourcepub fn new(
host_info: &'a HostInfo,
key_manager: Option<Box<dyn KeyManager>>,
runtime_header: &'a Header,
runtime_round_results: &'a RoundResults,
consensus_state: &'a ConsensusState,
history: &'a dyn HistoryHost,
epoch: EpochTime,
max_messages: u32,
) -> Self
pub fn new( host_info: &'a HostInfo, key_manager: Option<Box<dyn KeyManager>>, runtime_header: &'a Header, runtime_round_results: &'a RoundResults, consensus_state: &'a ConsensusState, history: &'a dyn HistoryHost, epoch: EpochTime, max_messages: u32, ) -> Self
Create a new dispatch context.
Trait Implementations§
source§impl<'a, R: Runtime> Context for RuntimeBatchContext<'a, R>
impl<'a, R: Runtime> Context for RuntimeBatchContext<'a, R>
source§fn get_logger(&self, module: &'static str) -> Logger
fn get_logger(&self, module: &'static str) -> Logger
Returns a logger.
source§fn key_manager(&self) -> Option<&dyn KeyManager>
fn key_manager(&self) -> Option<&dyn KeyManager>
The key manager, if the runtime is confidential.
source§fn runtime_header(&self) -> &Header
fn runtime_header(&self) -> &Header
Last runtime block header.
source§fn runtime_round_results(&self) -> &RoundResults
fn runtime_round_results(&self) -> &RoundResults
Results of executing the last successful runtime round.
source§fn consensus_state(&self) -> &ConsensusState
fn consensus_state(&self) -> &ConsensusState
Consensus state.
source§fn history(&self) -> &dyn HistoryHost
fn history(&self) -> &dyn HistoryHost
Historical state.
source§fn max_messages(&self) -> u32
fn max_messages(&self) -> u32
Maximum number of consensus messages that the runtime can emit in this block.
source§fn should_execute_contracts(&self) -> bool
fn should_execute_contracts(&self) -> bool
Whether smart contracts should be executed in this context.
source§fn is_allowed_query<R: Runtime>(&self, method: &str) -> bool
fn is_allowed_query<R: Runtime>(&self, method: &str) -> bool
Whether
method
is an allowed query per policy in the local config.source§fn local_config<T>(&self, key: &str) -> Option<T>where
T: Decode,
fn local_config<T>(&self, key: &str) -> Option<T>where
T: Decode,
Returns node operator-provided local configuration. Read more
source§fn runtime_id(&self) -> &Namespace
fn runtime_id(&self) -> &Namespace
Runtime ID.
source§fn is_confidential(&self) -> bool
fn is_confidential(&self) -> bool
Whether the context has a key manager available (e.g. the runtime is confidential).
Auto Trait Implementations§
impl<'a, R> Freeze for RuntimeBatchContext<'a, R>
impl<'a, R> !RefUnwindSafe for RuntimeBatchContext<'a, R>
impl<'a, R> !Send for RuntimeBatchContext<'a, R>
impl<'a, R> !Sync for RuntimeBatchContext<'a, R>
impl<'a, R> Unpin for RuntimeBatchContext<'a, R>where
R: Unpin,
impl<'a, R> !UnwindSafe for RuntimeBatchContext<'a, R>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more