Trait cucumber::WriterExt

source ·
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§

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 case max_concurrent_scenarios() is set to 1.

Wraps this Writer into a Normalized version.

See Normalize for more information.

Wraps this Writer to print a summary at the end of an output.

See Summarize for more information.

Wraps this Writer to fail on Skipped Steps if their Scenario isn’t marked with @allow.skipped tag.

See FailOnSkipped for more information.

Wraps this Writer to fail on Skipped Steps if the given with predicate returns true.

See FailOnSkipped for more information.

Wraps this Writer to re-output Skipped Steps at the end of an output.

Wraps this Writer to re-output Failed Steps or Parser errors at the end of an output.

Wraps this Writer to re-output filtered events at the end of an output.

Attaches the provided other Writer to the current one for passing events to both of them simultaneously.

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.

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.

Implementors§