pub trait Writer<World> {
type Cli: Args;
fn handle_event<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ev: Result<Event<Cucumber<World>>>,
cli: &'life1 Self::Cli
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}
Expand description
Writer of Cucumber
events to some output.
As Runner
produces events in a happened-before order (see
its order guarantees), Writer
s are required to be Normalized
.
As Cucumber::run()
returns Writer
, it can hold some state inside for
inspection after execution. See Summarize
and
Cucumber::run_and_exit()
for examples.
Required Associated Types
Required Methods
Implementors
sourceimpl<W, L, R, F> Writer<W> for Or<L, R, F>where
W: World,
L: Writer<W>,
R: Writer<W>,
F: FnMut(&Result<Event<Cucumber<W>>>, &Compose<L::Cli, R::Cli>) -> bool,
impl<W, L, R, F> Writer<W> for Or<L, R, F>where
W: World,
L: Writer<W>,
R: Writer<W>,
F: FnMut(&Result<Event<Cucumber<W>>>, &Compose<L::Cli, R::Cli>) -> bool,
sourceimpl<W, Out> Writer<W> for JUnit<W, Out>where
W: World + Debug,
Out: Write,
Available on crate feature output-junit
only.
impl<W, Out> Writer<W> for JUnit<W, Out>where
W: World + Debug,
Out: Write,
Available on crate feature
output-junit
only.sourceimpl<W, Wr> Writer<W> for Summarize<Wr>where
W: World,
Wr: for<'val> Arbitrary<'val, W, String> + Summarizable,
Wr::Cli: Colored,
impl<W, Wr> Writer<W> for Summarize<Wr>where
W: World,
Wr: for<'val> Arbitrary<'val, W, String> + Summarizable,
Wr::Cli: Colored,
sourceimpl<W, Wr, F> Writer<W> for FailOnSkipped<Wr, F>where
W: World,
F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool,
Wr: Writer<W>,
impl<W, Wr, F> Writer<W> for FailOnSkipped<Wr, F>where
W: World,
F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool,
Wr: Writer<W>,
sourceimpl<W, Wr, F> Writer<W> for Repeat<W, Wr, F>where
W: World,
Wr: Writer<W> + NonTransforming,
F: Fn(&Result<Event<Cucumber<W>>>) -> bool,
impl<W, Wr, F> Writer<W> for Repeat<W, Wr, F>where
W: World,
Wr: Writer<W> + NonTransforming,
F: Fn(&Result<Event<Cucumber<W>>>) -> bool,
sourceimpl<W: World + Debug, Out: Write> Writer<W> for Json<Out>
Available on crate feature output-json
only.
impl<W: World + Debug, Out: Write> Writer<W> for Json<Out>
Available on crate feature
output-json
only.sourceimpl<W: World + Debug, Out: Write> Writer<W> for Libtest<W, Out>
Available on crate feature libtest
only.
impl<W: World + Debug, Out: Write> Writer<W> for Libtest<W, Out>
Available on crate feature
libtest
only.