Struct gherkin_rust::Feature[][src]

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>,
}

A feature

Fields

keyword: String

The raw keyword used in the original source.

name: String

The 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.

tags: Vec<String>

The tags for the feature if provided.

span: Span

The (start, end) offset the feature directive was found in the .feature file.

position: LineCol

The (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

impl Feature[src]

pub fn builder() -> FeatureBuilder<((), (), (), (), (), (), (), (), (), ())>[src]

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.

impl Feature[src]

pub fn parse_path<P: AsRef<Path>>(
    path: P,
    env: GherkinEnv
) -> Result<Feature, ParseFileError>
[src]

pub fn parse<S: AsRef<str>>(
    input: S,
    env: GherkinEnv
) -> Result<Feature, ParseError>
[src]

Trait Implementations

impl Clone for Feature[src]

impl Debug for Feature[src]

impl Eq for Feature[src]

impl Hash for Feature[src]

impl Ord for Feature[src]

impl PartialEq<Feature> for Feature[src]

impl PartialOrd<Feature> for Feature[src]

impl StructuralEq for Feature[src]

impl StructuralPartialEq for Feature[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.