Struct oasis_runtime_sdk::testing::mock::Mock
source · pub struct Mock {
pub host_info: HostInfo,
pub runtime_header: Header,
pub runtime_round_results: RoundResults,
pub consensus_state: ConsensusState,
pub history: Box<dyn HistoryHost>,
pub epoch: EpochTime,
pub max_messages: u32,
}
Expand description
Mock dispatch context factory.
Fields§
§host_info: HostInfo
§runtime_header: Header
§runtime_round_results: RoundResults
§consensus_state: ConsensusState
§history: Box<dyn HistoryHost>
§epoch: EpochTime
§max_messages: u32
Implementations§
source§impl Mock
impl Mock
sourcepub fn create_ctx(&mut self) -> RuntimeBatchContext<'_, EmptyRuntime>
pub fn create_ctx(&mut self) -> RuntimeBatchContext<'_, EmptyRuntime>
Create a new mock dispatch context.
sourcepub fn create_ctx_for_runtime<R: Runtime>(
&mut self,
confidential: bool,
) -> RuntimeBatchContext<'_, R>
pub fn create_ctx_for_runtime<R: Runtime>( &mut self, confidential: bool, ) -> RuntimeBatchContext<'_, R>
Create a new mock dispatch context.
sourcepub fn with_local_config(local_config: BTreeMap<String, Value>) -> Self
pub fn with_local_config(local_config: BTreeMap<String, Value>) -> Self
Create an instance with the given local configuration.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Mock
impl !RefUnwindSafe for Mock
impl !Send for Mock
impl !Sync for Mock
impl Unpin for Mock
impl !UnwindSafe for Mock
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