pub trait WriterExt: Sized + Sealed {
// Required methods
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
Normalizedorder. 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 Steps 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>
fn fail_on_skipped_with<F>(self, with: F) -> FailOnSkipped<Self, F>
Wraps this Writer to fail on Skipped Steps 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>
fn repeat_if<W, F>(self, filter: F) -> Repeat<W, Self, F>
Wraps this Writer to re-output filtered 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 ArbitraryWriters.
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 StatsWriters.
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.