Struct cucumber::runner::Basic [−][src]
pub struct Basic<World, F = WhichScenarioFn, Before = BeforeHookFn<World>, After = AfterHookFn<World>> { /* fields omitted */ }
Expand description
Default Runner
implementation which follows order guarantees from
the Runner
trait docs.
Executes Scenario
s concurrently based on the custom function, which
returns ScenarioType
. Also, can limit maximum number of concurrent
Scenario
s.
Implementations
pub fn which_scenario<F>(self, func: F) -> Basic<World, F, Before, After> where
F: Fn(&Feature, Option<&Rule>, &Scenario) -> ScenarioType + 'static,
pub fn which_scenario<F>(self, func: F) -> Basic<World, F, Before, After> where
F: Fn(&Feature, Option<&Rule>, &Scenario) -> ScenarioType + 'static,
Function determining whether a Scenario
is Concurrent
or
a Serial
one.
Sets a hook, executed on each Scenario
before running all its
Step
s, including Background
ones.
Sets hook, executed on each Scenario
after running all its
Step
s, even after Skipped
of Failed
ones.
Last World
argument is supplied to the function, in case it was
initialized before by running before
hook or any non-failed
Step
. In case the last Scenario
’s Step
failed, we want to
return event with an exact World
state. Also, we don’t want to impose
additional Clone
bounds on World
, so the only option left is to
pass None
to the function.
Sets the given Collection
of Step
s to this Runner
.
Trait Implementations
impl<W, Which, Before, After> Runner<W> for Basic<W, Which, Before, After> where
W: World,
Which: Fn(&Feature, Option<&Rule>, &Scenario) -> ScenarioType + 'static,
Before: for<'a> Fn(&'a Feature, Option<&'a Rule>, &'a Scenario, &'a mut W) -> LocalBoxFuture<'a, ()> + 'static,
After: for<'a> Fn(&'a Feature, Option<&'a Rule>, &'a Scenario, Option<&'a mut W>) -> LocalBoxFuture<'a, ()> + 'static,
impl<W, Which, Before, After> Runner<W> for Basic<W, Which, Before, After> where
W: World,
Which: Fn(&Feature, Option<&Rule>, &Scenario) -> ScenarioType + 'static,
Before: for<'a> Fn(&'a Feature, Option<&'a Rule>, &'a Scenario, &'a mut W) -> LocalBoxFuture<'a, ()> + 'static,
After: for<'a> Fn(&'a Feature, Option<&'a Rule>, &'a Scenario, Option<&'a mut W>) -> LocalBoxFuture<'a, ()> + 'static,
CLI options of this Runner
. In case no options should be introduced,
just use cli::Empty
. Read more
type EventStream = LocalBoxStream<'static, Result<Event<Cucumber<W>>>>
type EventStream = LocalBoxStream<'static, Result<Event<Cucumber<W>>>>
Output events [Stream
].
Auto Trait Implementations
impl<World, F, Before, After> RefUnwindSafe for Basic<World, F, Before, After> where
After: RefUnwindSafe,
Before: RefUnwindSafe,
F: RefUnwindSafe,
impl<World, F, Before, After> Send for Basic<World, F, Before, After> where
After: Send,
Before: Send,
F: Send,
impl<World, F, Before, After> Sync for Basic<World, F, Before, After> where
After: Sync,
Before: Sync,
F: Sync,
impl<World, F, Before, After> Unpin for Basic<World, F, Before, After> where
After: Unpin,
Before: Unpin,
F: Unpin,
impl<World, F, Before, After> UnwindSafe for Basic<World, F, Before, After> where
After: UnwindSafe,
Before: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Asserts this Writer
being Normalized
. Read more
pub fn fail_on_skipped(
Self
) -> FailOnSkipped<T, fn(&Feature, Option<&Rule>, &Scenario) -> bool>
pub fn fail_on_skipped(
Self
) -> FailOnSkipped<T, fn(&Feature, Option<&Rule>, &Scenario) -> bool>
pub fn fail_on_skipped_with<F>(Self, F) -> FailOnSkipped<T, F> where
F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool,
pub fn fail_on_skipped_with<F>(Self, F) -> FailOnSkipped<T, F> where
F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool,
Wraps this Writer
into a discard::Arbitrary
one, providing a
no-op ArbitraryWriter
implementation. Read more
Wraps this Writer
into a discard::Arbitrary
one, providing a
no-op FailureWriter
implementation returning only 0
. Read more