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), Writers 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§
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.
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.