pub trait WriterExt: Sized + Sealed {
fn assert_normalized(self) -> AssertNormalized<Self>;
fn normalized<W>(self) -> Normalize<W, Self>;
fn summarized(self) -> Summarize<Self>;
fn fail_on_skipped(self) -> FailOnSkipped<Self>;
fn fail_on_skipped_with<F>(self, with: F) -> FailOnSkipped<Self, F>
where
F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool;
fn repeat_skipped<W>(self) -> Repeat<W, Self>;
fn repeat_failed<W>(self) -> Repeat<W, Self>;
fn repeat_if<W, F>(self, filter: F) -> Repeat<W, Self, F>
where
F: Fn(&Result<Event<Cucumber<W>>>) -> bool;
fn tee<W, Wr: Writer<W>>(self, other: Wr) -> Tee<Self, Wr>;
fn discard_arbitrary_writes(self) -> Arbitrary<Self>;
fn discard_stats_writes(self) -> Stats<Self>;
}
Expand description
Extension of Writer
allowing its normalization and summarization.
Required Methods§
sourcefn assert_normalized(self) -> AssertNormalized<Self>
fn assert_normalized(self) -> AssertNormalized<Self>
Asserts this Writer
being Normalized
.
Technically is no-op, only forcing the Writer
to become
Normalized
despite it actually doesn’t represent the one.
If you need a real normalization, use normalized()
instead.
⚠️ WARNING: Should be used only in case you are absolutely sure, that incoming events will be emitted in a
Normalized
order. For example, in casemax_concurrent_scenarios()
is set to1
.
sourcefn normalized<W>(self) -> Normalize<W, Self>
fn normalized<W>(self) -> Normalize<W, Self>
sourcefn summarized(self) -> Summarize<Self>
fn summarized(self) -> Summarize<Self>
sourcefn fail_on_skipped(self) -> FailOnSkipped<Self>
fn fail_on_skipped(self) -> FailOnSkipped<Self>
Wraps this Writer
to fail on Skipped
Step
s if their
Scenario
isn’t marked with @allow.skipped
tag.
See FailOnSkipped
for more information.
sourcefn fail_on_skipped_with<F>(self, with: F) -> FailOnSkipped<Self, F>where
F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool,
fn fail_on_skipped_with<F>(self, with: F) -> FailOnSkipped<Self, F>where
F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool,
Wraps this Writer
to fail on Skipped
Step
s if the given
with
predicate returns true
.
See FailOnSkipped
for more information.
sourcefn repeat_skipped<W>(self) -> Repeat<W, Self>
fn repeat_skipped<W>(self) -> Repeat<W, Self>
sourcefn repeat_failed<W>(self) -> Repeat<W, Self>
fn repeat_failed<W>(self) -> Repeat<W, Self>
sourcefn repeat_if<W, F>(self, filter: F) -> Repeat<W, Self, F>where
F: Fn(&Result<Event<Cucumber<W>>>) -> bool,
fn repeat_if<W, F>(self, filter: F) -> Repeat<W, Self, F>where
F: Fn(&Result<Event<Cucumber<W>>>) -> bool,
Wraps this Writer
to re-output filter
ed events at the end of an
output.
sourcefn tee<W, Wr: Writer<W>>(self, other: Wr) -> Tee<Self, Wr>
fn tee<W, Wr: Writer<W>>(self, other: Wr) -> Tee<Self, Wr>
Attaches the provided other
Writer
to the current one for passing
events to both of them simultaneously.
sourcefn discard_arbitrary_writes(self) -> Arbitrary<Self>
fn discard_arbitrary_writes(self) -> Arbitrary<Self>
Wraps this Writer
into a discard::Arbitrary
one, providing a
no-op ArbitraryWriter
implementation.
Intended to be used for feeding a non-ArbitraryWriter
Writer
into a tee()
, as the later accepts only ArbitraryWriter
s.
sourcefn discard_stats_writes(self) -> Stats<Self>
fn discard_stats_writes(self) -> Stats<Self>
Wraps this Writer
into a discard::Stats
one, providing a no-op
StatsWriter
implementation returning only 0
.
Intended to be used for feeding a non-StatsWriter
Writer
into a
tee()
, as the later accepts only StatsWriter
s.