pub struct Step {
pub keyword: StepKeyword,
pub pattern: &'static StepPattern,
pub run: StepFn,
pub run_async: AsyncStepFn,
pub execution_mode: StepExecutionMode,
pub fixtures: &'static [&'static str],
pub file: &'static str,
pub line: u32,
}Expand description
Represents a single step definition registered with the framework.
Fields§
§keyword: StepKeywordThe step keyword, e.g. Given or When.
pattern: &'static StepPatternPattern text used to match a Gherkin step.
run: StepFnFunction pointer executed when the step is invoked (sync mode).
run_async: AsyncStepFnFunction pointer executed when the step is invoked (async mode).
For sync step definitions, this wraps the result in an immediately-ready future, enabling mixed sync and async steps within async scenarios.
execution_mode: StepExecutionModeWhether the step has a native sync body, a native async body, or both.
fixtures: &'static [&'static str]Names of fixtures this step requires.
file: &'static strSource file where the step is defined.
line: u32Line number within the source file.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Step
impl RefUnwindSafe for Step
impl Send for Step
impl Sync for Step
impl Unpin for Step
impl UnwindSafe for Step
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more