logo
pub trait World: Sized + 'static {
    type Error: StdError;
    fn new<'async_trait>(
    ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + 'async_trait>>
    where
        Self: 'async_trait
; }
Expand description

Represents a shared user-defined state for a Cucumber run. It lives on per-scenario basis.

This crate doesn’t provide out-of-box solution for managing state shared across scenarios, because we want some friction there to avoid tests being dependent on each other. If your workflow needs a way to share state between scenarios (ex. database connection pool), we recommend using once_cell crate or organize it other way via shared state.

Associated Types

Error of creating a new World instance.

Required methods

Creates a new World instance.

Implementors