pub trait Writer<World> {
type Cli: Args;
// Required method
fn handle_event(
&mut self,
ev: Result<Event<Cucumber<World>>>,
cli: &Self::Cli
) -> impl Future<Output = ()>;
}
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§
Object Safety§
This trait is not object safe.
Implementors§
source§impl<W, Wr, F> Writer<W> for FailOnSkipped<Wr, F>
impl<W, Wr, F> Writer<W> for FailOnSkipped<Wr, F>
source§impl<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.source§impl<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.