pub trait World: Sized + 'static {
type Error: Display;
// Required method
fn new() -> impl Future<Output = Result<Self, Self::Error>>;
// Provided methods
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<I: AsRef<Path>>(input: I) -> impl Future<Output = ()>
where Self: Debug + WorldInventory { ... }
fn filter_run<I, F>(input: I, filter: F) -> impl Future<Output = ()>
where Self: Debug + WorldInventory,
I: AsRef<Path>,
F: Fn(&Feature, Option<&Rule>, &Scenario) -> bool + 'static { ... }
}
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,
Available on crate feature macros
only.
fn collection() -> Collection<Self>where
Self: Debug + WorldInventory,
macros
only.sourcefn cucumber<I: AsRef<Path>>(
) -> Cucumber<Self, Basic, I, Basic<Self>, Summarize<Normalize<Self, Basic>>>where
Self: Debug + WorldInventory,
Available on crate feature macros
only.
fn cucumber<I: AsRef<Path>>(
) -> Cucumber<Self, Basic, I, Basic<Self>, Summarize<Normalize<Self, Basic>>>where
Self: Debug + WorldInventory,
macros
only.sourcefn run<I: AsRef<Path>>(input: I) -> impl Future<Output = ()>where
Self: Debug + WorldInventory,
Available on crate feature macros
only.
fn run<I: AsRef<Path>>(input: I) -> impl Future<Output = ()>where
Self: Debug + WorldInventory,
macros
only.sourcefn filter_run<I, F>(input: I, filter: F) -> impl Future<Output = ()>
Available on crate feature macros
only.
fn filter_run<I, F>(input: I, filter: F) -> impl Future<Output = ()>
macros
only.Object Safety§
This trait is not object safe.