Trait cucumber::codegen::ParametersProvider

source ·
pub trait ParametersProvider<Input> {
    type Item: AsChar;
    type Value: InputIter<Item = Self::Item>;

    // Required method
    fn get(&self, input: &Input) -> Option<Self::Value>;
}
Available on crate feature macros only.
Expand description

Provider of custom Parameters.

Required Associated Types§

source

type Item: AsChar

source

type Value: InputIter<Item = Self::Item>

Value matcher to be used in a Regex.

Usually, a Parameter is represented by a single Regex capturing group. In case there are multiple capturing groups, they will be named like __{parameter_id}_{group_id}. This is done to identify multiple capturing groups related to a single Parameter.

Required Methods§

source

fn get(&self, input: &Input) -> Option<Self::Value>

Returns a Value matcher corresponding to the given input, if any.

Implementations on Foreign Types§

source§

impl<'p, Input, Key, Value, S> Provider<Input> for &'p HashMap<Key, Value, S>
where Input: InputIter, <Input as InputIter>::Item: AsChar, Key: AsRef<str>, Value: AsRef<str>,

§

type Item = char

§

type Value = &'p str

source§

fn get( &self, input: &Input ) -> Option<<&'p HashMap<Key, Value, S> as Provider<Input>>::Value>

Implementors§