pub enum Scenario<World> {
Started,
Hook(HookType, Hook<World>),
Background(Arc<Step>, Step<World>),
Step(Arc<Step>, Step<World>),
Log(String),
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.
Log(String)
Scenario
’s log entry is emitted.
Finished
Scenario
execution being finished.
Implementations§
source§impl<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§
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
source§impl<T> Ext for T
impl<T> Ext for T
source§fn assert_normalized(self) -> AssertNormalized<T>
fn assert_normalized(self) -> AssertNormalized<T>
source§fn normalized<W>(self) -> Normalize<W, T>
fn normalized<W>(self) -> Normalize<W, T>
source§fn summarized(self) -> Summarize<T>
fn summarized(self) -> Summarize<T>
source§fn fail_on_skipped(self) -> FailOnSkipped<T>
fn fail_on_skipped(self) -> FailOnSkipped<T>
source§fn fail_on_skipped_with<F>(self, f: F) -> FailOnSkipped<T, F>
fn fail_on_skipped_with<F>(self, f: F) -> FailOnSkipped<T, F>
source§fn repeat_skipped<W>(self) -> Repeat<W, T>
fn repeat_skipped<W>(self) -> Repeat<W, T>
source§fn repeat_failed<W>(self) -> Repeat<W, T>
fn repeat_failed<W>(self) -> Repeat<W, T>
source§fn repeat_if<W, F>(self, filter: F) -> Repeat<W, T, F>
fn repeat_if<W, F>(self, filter: F) -> Repeat<W, T, F>
Wraps this
Writer
to re-output filter
ed events at the end of an
output.source§fn tee<W, Wr>(self, other: Wr) -> Tee<T, Wr>where
Wr: Writer<W>,
fn tee<W, Wr>(self, other: Wr) -> Tee<T, Wr>where
Wr: Writer<W>,
Attaches the provided
other
Writer
to the current one for passing
events to both of them simultaneously.source§fn 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 moresource§fn 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