pub trait World: Sized + 'static {
type Error: Display;
fn new<'async_trait>(
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + 'async_trait>>
where
Self: 'async_trait;
fn collection() -> Collection<Self>
where
Self: Debug + WorldInventory,
{ ... }
fn cucumber<I: AsRef<Path>>(
) -> Cucumber<Self, Basic, I, Basic<Self>, Summarize<Normalize<Self, Basic>>>
where
Self: Debug + WorldInventory,
{ ... }
fn run<'async_trait, I>(
input: I
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
where
Self: Debug + WorldInventory,
I: 'async_trait + AsRef<Path>,
Self: 'async_trait,
{ ... }
fn filter_run<'async_trait, I, F>(
input: I,
filter: F
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>
where
Self: Debug + WorldInventory,
I: AsRef<Path>,
F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool + 'static,
I: 'async_trait,
F: 'async_trait,
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.
Required Associated Types
Required Methods
Provided Methods
sourcefn collection() -> Collection<Self>where
Self: Debug + WorldInventory,
fn collection() -> Collection<Self>where
Self: Debug + WorldInventory,
Available on crate feature
macros
only.Available on crate feature
macros
only.Available on crate feature
macros
only.Available on crate feature
macros
only.