pub struct Feature {
pub keyword: String,
pub name: String,
pub description: Option<String>,
pub background: Option<Background>,
pub scenarios: Vec<Scenario>,
pub rules: Vec<Rule>,
pub tags: Vec<String>,
pub span: Span,
pub position: LineCol,
pub path: Option<PathBuf>,
}Expand description
A feature
Fields§
§keyword: StringThe raw keyword used in the original source.
name: StringThe name of the feature.
description: Option<String>The description of the feature, if found.
background: Option<Background>The background of the feature, if found.
scenarios: Vec<Scenario>The scenarios for the feature.
rules: Vec<Rule>The rules for the feature.
The tags for the feature if provided.
span: SpanThe (start, end) offset the feature directive was found in the .feature file.
position: LineColThe (line, col) position the feature directive was found in the .feature file.
path: Option<PathBuf>The path supplied for the parsed Feature, if known.
Implementations§
Source§impl Feature
impl Feature
Sourcepub fn builder() -> FeatureBuilder<((), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> FeatureBuilder<((), (), (), (), (), (), (), (), (), ())>
Create a builder for building Feature.
On the builder, call .keyword(...), .name(...), .description(...)(optional), .background(...)(optional), .scenarios(...)(optional), .rules(...)(optional), .tags(...)(optional), .span(...)(optional), .position(...)(optional), .path(...)(optional) to set the values of the fields (they accept Into values).
Finally, call .build() to create the instance of Feature.