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

Source§

type Item = char

Source§

type Value = &'p str

Source§

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

Implementors§