Struct modelator::event::EventRunner
source · [−]pub struct EventRunner<System: Debug> { /* private fields */ }
Expand description
A runner that allows to run tests specified as event streams
against the given concrete system.
You can implement several instances of StateHandlers
and ActionHandlers for the System
, thus allowing your system
to handle several kinds of abstract states or actions.
Implementations
pub fn with_state<State>(self) -> Self where
State: 'static + DeserializeOwned + UnwindSafe + Clone + Debug + PartialEq,
System: 'static + StateHandler<State>,
pub fn with_state<State>(self) -> Self where
State: 'static + DeserializeOwned + UnwindSafe + Clone + Debug + PartialEq,
System: 'static + StateHandler<State>,
Equip the runner with the ability to handle given abstract State
.
pub fn with_action<Action>(self) -> Self where
Action: 'static + DeserializeOwned + UnwindSafe + Clone,
System: 'static + ActionHandler<Action>,
<System as ActionHandler<Action>>::Outcome: 'static + Serialize,
pub fn with_action<Action>(self) -> Self where
Action: 'static + DeserializeOwned + UnwindSafe + Clone,
System: 'static + ActionHandler<Action>,
<System as ActionHandler<Action>>::Outcome: 'static + Serialize,
Equip the runner with the ability to handle given abstract Action
.
Run the runner on:
- the given concrete
system
, which provides storage of concrete system states, as well as the handling of the abstract states and actions; - the given stream of events, representing the test.
Returns the test result.
Trait Implementations
Auto Trait Implementations
impl<System> !RefUnwindSafe for EventRunner<System>
impl<System> !Send for EventRunner<System>
impl<System> !Sync for EventRunner<System>
impl<System> Unpin for EventRunner<System>
impl<System> !UnwindSafe for EventRunner<System>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more