Trait Provider

Source
pub trait Provider<I> {
    type Item: AsChar;
    type Value: Input<Item = Self::Item>;

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

Provider of custom Parameters.

Required Associated Types§

Source

type Item: AsChar

Source

type Value: Input<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: &I) -> Option<Self::Value>

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

Implementations on Foreign Types§

Source§

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

Source§

type Item = char

Source§

type Value = &'p str

Source§

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

Implementors§