pub enum Scenario<World> {
Started,
Hook(HookType, Hook<World>),
Background(Arc<Step>, Step<World>),
Step(Arc<Step>, Step<World>),
Finished,
}
Expand description
Event specific to a particular Scenario.
Variants
Started
Scenario
execution being started.
Hook(HookType, Hook<World>)
Hook
event.
Background(Arc<Step>, Step<World>)
Background
Step
event.
Step(Arc<Step>, Step<World>)
Step
event.
Finished
Scenario
execution being finished.
Implementations
sourceimpl<World> Scenario<World>
impl<World> Scenario<World>
sourcepub const fn hook_started(which: HookType) -> Self
pub const fn hook_started(which: HookType) -> Self
Constructs an event of a Scenario
hook being started.
sourcepub const fn hook_passed(which: HookType) -> Self
pub const fn hook_passed(which: HookType) -> Self
Constructs an event of a passed Scenario
hook.
sourcepub fn hook_failed(which: HookType, world: Option<Arc<World>>, info: Info) -> Self
pub fn hook_failed(which: HookType, world: Option<Arc<World>>, info: Info) -> Self
Constructs an event of a failed Scenario
hook.
sourcepub fn step_started(step: Arc<Step>) -> Self
pub fn step_started(step: Arc<Step>) -> Self
Constructs an event of a Step
being started.
sourcepub fn background_step_started(step: Arc<Step>) -> Self
pub fn background_step_started(step: Arc<Step>) -> Self
Constructs an event of a Background
Step
being started.
sourcepub fn step_passed(
step: Arc<Step>,
captures: CaptureLocations,
loc: Option<Location>
) -> Self
pub fn step_passed(
step: Arc<Step>,
captures: CaptureLocations,
loc: Option<Location>
) -> Self
Constructs an event of a passed Step
.
sourcepub fn background_step_passed(
step: Arc<Step>,
captures: CaptureLocations,
loc: Option<Location>
) -> Self
pub fn background_step_passed(
step: Arc<Step>,
captures: CaptureLocations,
loc: Option<Location>
) -> Self
Constructs an event of a passed Background
Step
.
sourcepub fn step_skipped(step: Arc<Step>) -> Self
pub fn step_skipped(step: Arc<Step>) -> Self
Constructs an event of a skipped Step
.
sourcepub fn background_step_skipped(step: Arc<Step>) -> Self
pub fn background_step_skipped(step: Arc<Step>) -> Self
Constructs an event of a skipped Background
Step
.
sourcepub fn step_failed(
step: Arc<Step>,
captures: Option<CaptureLocations>,
loc: Option<Location>,
world: Option<Arc<World>>,
info: impl Into<StepError>
) -> Self
pub fn step_failed(
step: Arc<Step>,
captures: Option<CaptureLocations>,
loc: Option<Location>,
world: Option<Arc<World>>,
info: impl Into<StepError>
) -> Self
Constructs an event of a failed Step
.
sourcepub fn background_step_failed(
step: Arc<Step>,
captures: Option<CaptureLocations>,
loc: Option<Location>,
world: Option<Arc<World>>,
info: impl Into<StepError>
) -> Self
pub fn background_step_failed(
step: Arc<Step>,
captures: Option<CaptureLocations>,
loc: Option<Location>,
world: Option<Arc<World>>,
info: impl Into<StepError>
) -> Self
Constructs an event of a failed Background
Step
.
sourcepub const fn with_retries(
self,
retries: Option<Retries>
) -> RetryableScenario<World>
pub const fn with_retries(
self,
retries: Option<Retries>
) -> RetryableScenario<World>
Transforms this Scenario
event into a RetryableScenario
event.
Trait Implementations
Auto Trait Implementations
impl<World> !RefUnwindSafe for Scenario<World>
impl<World> !Send for Scenario<World>
impl<World> !Sync for Scenario<World>
impl<World> Unpin for Scenario<World>
impl<World> !UnwindSafe for Scenario<World>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Ext for T
impl<T> Ext for T
sourcefn assert_normalized(self) -> AssertNormalized<T>
fn assert_normalized(self) -> AssertNormalized<T>
sourcefn normalized<W>(self) -> Normalize<W, T>
fn normalized<W>(self) -> Normalize<W, T>
sourcefn summarized(self) -> Summarize<T>
fn summarized(self) -> Summarize<T>
sourcefn fail_on_skipped(
self
) -> FailOnSkipped<T, fn(&Feature, Option<&Rule>, &Scenario) -> bool>
fn fail_on_skipped(
self
) -> FailOnSkipped<T, fn(&Feature, Option<&Rule>, &Scenario) -> bool>
sourcefn fail_on_skipped_with<F>(self, f: F) -> FailOnSkipped<T, F>where
F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool,
fn fail_on_skipped_with<F>(self, f: F) -> FailOnSkipped<T, F>where
F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool,
sourcefn repeat_if<W, F>(self, filter: F) -> Repeat<W, T, F>where
F: Fn(&Result<Event<Cucumber<W>>, Error>) -> bool,
fn repeat_if<W, F>(self, filter: F) -> Repeat<W, T, F>where
F: Fn(&Result<Event<Cucumber<W>>, Error>) -> bool,
sourcefn discard_arbitrary_writes(self) -> Arbitrary<T>
fn discard_arbitrary_writes(self) -> Arbitrary<T>
Wraps this
Writer
into a discard::Arbitrary
one, providing a
no-op ArbitraryWriter
implementation. Read moresourcefn discard_stats_writes(self) -> Stats<T>
fn discard_stats_writes(self) -> Stats<T>
Wraps this
Writer
into a discard::Stats
one, providing a no-op
StatsWriter
implementation returning only 0
. Read more