pub trait Runner<World> {
type Cli: Args;
type EventStream: Stream<Item = Result<Event<Cucumber<World>>>>;
// Required method
fn run<S>(self, features: S, cli: Self::Cli) -> Self::EventStream
where S: Stream<Item = Result<Feature>> + 'static;
}
Expand description
Executor of Parser
output producing Cucumber
events for Writer
.
§Order guarantees
Implementors are expected to source events in a happened-before order. For
example event::Scenario::Started
for a single Scenario
should
predate any other events of this Scenario
, while
event::Scenario::Finished
should be the last one. Step
events of
this Scenario
should be emitted in order of declaration in .feature
file. But as Scenario
s can be executed concurrently, events from one
Scenario
can be interrupted by events of a different one (which are also
following the happened-before order). Those rules are applied also to
Rule
s and Feature
s. If you want to avoid those interruptions for
some Scenario
, it should be resolved as ScenarioType::Serial
by the
Runner
.
Because of that, Writer
, accepting events produced by a Runner
has
to be Normalized
.
All those rules are considered in a Basic
reference Runner
implementation.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.