Trait cucumber::Writer

source ·
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
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; }
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§

CLI options of this Writer. In case no options should be introduced, just use cli::Empty.

All CLI options from Parser, Runner and Writer will be merged together, so overlapping arguments will cause a runtime panic.

Required Methods§

Handles the given Cucumber event.

Implementors§