Struct cucumber_expressions::expand::parameters::WithCustom
source · [−]pub struct WithCustom<Element, Parameters> {
pub element: Element,
pub parameters: Parameters,
}
Expand description
Parser of a Cucumber Expressions AST Element
with custom
Parameters
in mind.
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
.
Fields
element: Element
Parsed element of a Cucumber Expressions AST.
parameters: Parameters
Custom Parameters
(in addition to default ones) to be used for
expanding the Element
into a Regex
.
Trait Implementations
sourceimpl<Element: Clone, Parameters: Clone> Clone for WithCustom<Element, Parameters>
impl<Element: Clone, Parameters: Clone> Clone for WithCustom<Element, Parameters>
sourcefn clone(&self) -> WithCustom<Element, Parameters>
fn clone(&self) -> WithCustom<Element, Parameters>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<Element: Debug, Parameters: Debug> Debug for WithCustom<Element, Parameters>
impl<Element: Debug, Parameters: Debug> Debug for WithCustom<Element, Parameters>
sourceimpl<Input, Pars> IntoRegexCharIter<Input> for WithCustom<Expression<Input>, Pars> where
Input: Clone + Display + InputIter,
<Input as InputIter>::Item: AsChar,
Pars: Clone + Provider<Input>,
<Pars as Provider<Input>>::Value: InputIter,
impl<Input, Pars> IntoRegexCharIter<Input> for WithCustom<Expression<Input>, Pars> where
Input: Clone + Display + InputIter,
<Input as InputIter>::Item: AsChar,
Pars: Clone + Provider<Input>,
<Pars as Provider<Input>>::Value: InputIter,
type Iter = Chain<Chain<Once<Result<char, ParameterError<Input>>>, FlatMap<Map<Zip<IntoIter<SingleExpression<Input>>, Repeat<Pars>>, fn(_: (SingleExpression<Input>, Pars)) -> WithCustom<SingleExpression<Input>, Pars>>, Either<<WithCustom<Parameter<Input>, Pars> as IntoRegexCharIter<Input>>::Iter, Either<<Alternation<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Optional<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Parameter<Input> as IntoRegexCharIter<Input>>::Iter, Map<EscapeForRegex<Map<<Input as InputIter>::IterElem, fn(_: <Input as InputIter>::Item) -> char>>, fn(_: char) -> Result<char, ParameterError<Input>>>>>>>, fn(_: WithCustom<SingleExpression<Input>, Pars>) -> Either<<WithCustom<Parameter<Input>, Pars> as IntoRegexCharIter<Input>>::Iter, Either<<Alternation<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Optional<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Parameter<Input> as IntoRegexCharIter<Input>>::Iter, Map<EscapeForRegex<Map<<Input as InputIter>::IterElem, fn(_: <Input as InputIter>::Item) -> char>>, fn(_: char) -> Result<char, ParameterError<Input>>>>>>>>>, Once<Result<char, ParameterError<Input>>>>
type Iter = Chain<Chain<Once<Result<char, ParameterError<Input>>>, FlatMap<Map<Zip<IntoIter<SingleExpression<Input>>, Repeat<Pars>>, fn(_: (SingleExpression<Input>, Pars)) -> WithCustom<SingleExpression<Input>, Pars>>, Either<<WithCustom<Parameter<Input>, Pars> as IntoRegexCharIter<Input>>::Iter, Either<<Alternation<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Optional<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Parameter<Input> as IntoRegexCharIter<Input>>::Iter, Map<EscapeForRegex<Map<<Input as InputIter>::IterElem, fn(_: <Input as InputIter>::Item) -> char>>, fn(_: char) -> Result<char, ParameterError<Input>>>>>>>, fn(_: WithCustom<SingleExpression<Input>, Pars>) -> Either<<WithCustom<Parameter<Input>, Pars> as IntoRegexCharIter<Input>>::Iter, Either<<Alternation<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Optional<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Parameter<Input> as IntoRegexCharIter<Input>>::Iter, Map<EscapeForRegex<Map<<Input as InputIter>::IterElem, fn(_: <Input as InputIter>::Item) -> char>>, fn(_: char) -> Result<char, ParameterError<Input>>>>>>>>>, Once<Result<char, ParameterError<Input>>>>
Type of an Iterator
performing the expansion.
sourceimpl<Input, Pars> IntoRegexCharIter<Input> for WithCustom<SingleExpression<Input>, Pars> where
Input: Clone + Display + InputIter,
<Input as InputIter>::Item: AsChar,
Pars: Provider<Input>,
<Pars as Provider<Input>>::Value: InputIter,
impl<Input, Pars> IntoRegexCharIter<Input> for WithCustom<SingleExpression<Input>, Pars> where
Input: Clone + Display + InputIter,
<Input as InputIter>::Item: AsChar,
Pars: Provider<Input>,
<Pars as Provider<Input>>::Value: InputIter,
type Iter = Either<<WithCustom<Parameter<Input>, Pars> as IntoRegexCharIter<Input>>::Iter, Either<<Alternation<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Optional<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Parameter<Input> as IntoRegexCharIter<Input>>::Iter, Map<EscapeForRegex<Map<<Input as InputIter>::IterElem, fn(_: <Input as InputIter>::Item) -> char>>, fn(_: char) -> Result<char, ParameterError<Input>>>>>>>
type Iter = Either<<WithCustom<Parameter<Input>, Pars> as IntoRegexCharIter<Input>>::Iter, Either<<Alternation<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Optional<Input> as IntoRegexCharIter<Input>>::Iter, Either<<Parameter<Input> as IntoRegexCharIter<Input>>::Iter, Map<EscapeForRegex<Map<<Input as InputIter>::IterElem, fn(_: <Input as InputIter>::Item) -> char>>, fn(_: char) -> Result<char, ParameterError<Input>>>>>>>
Type of an Iterator
performing the expansion.
sourceimpl<Input, P> IntoRegexCharIter<Input> for WithCustom<Parameter<Input>, P> where
Input: Clone + Display + InputIter,
<Input as InputIter>::Item: AsChar,
P: Provider<Input>,
<P as Provider<Input>>::Value: InputIter,
impl<Input, P> IntoRegexCharIter<Input> for WithCustom<Parameter<Input>, P> where
Input: Clone + Display + InputIter,
<Input as InputIter>::Item: AsChar,
P: Provider<Input>,
<P as Provider<Input>>::Value: InputIter,
type Iter = Either<Once<Result<char, ParameterError<Input>>>, Either<Either<Either<Map<Chars<'static>, fn(_: char) -> Result<char, ParameterError<Input>>>, Map<OwnedChars, fn(_: char) -> Result<char, ParameterError<Input>>>>, Once<Result<char, ParameterError<Input>>>>, Either<Chain<Chain<Map<Chars<'static>, fn(_: char) -> Result<char, ParameterError<Input>>>, Map<OwnedChars, fn(_: char) -> Result<char, ParameterError<Input>>>>, Once<Result<char, ParameterError<Input>>>>, Chain<Chain<Once<Result<char, ParameterError<Input>>>, Map<<<P as Provider<Input>>::Value as InputIter>::IterElem, fn(_: <<P as Provider<Input>>::Value as InputIter>::Item) -> Result<char, ParameterError<Input>>>>, Once<Result<char, ParameterError<Input>>>>>>>
type Iter = Either<Once<Result<char, ParameterError<Input>>>, Either<Either<Either<Map<Chars<'static>, fn(_: char) -> Result<char, ParameterError<Input>>>, Map<OwnedChars, fn(_: char) -> Result<char, ParameterError<Input>>>>, Once<Result<char, ParameterError<Input>>>>, Either<Chain<Chain<Map<Chars<'static>, fn(_: char) -> Result<char, ParameterError<Input>>>, Map<OwnedChars, fn(_: char) -> Result<char, ParameterError<Input>>>>, Once<Result<char, ParameterError<Input>>>>, Chain<Chain<Once<Result<char, ParameterError<Input>>>, Map<<<P as Provider<Input>>::Value as InputIter>::IterElem, fn(_: <<P as Provider<Input>>::Value as InputIter>::Item) -> Result<char, ParameterError<Input>>>>, Once<Result<char, ParameterError<Input>>>>>>>
Type of an Iterator
performing the expansion.
impl<Element: Copy, Parameters: Copy> Copy for WithCustom<Element, Parameters>
Auto Trait Implementations
impl<Element, Parameters> RefUnwindSafe for WithCustom<Element, Parameters> where
Element: RefUnwindSafe,
Parameters: RefUnwindSafe,
impl<Element, Parameters> Send for WithCustom<Element, Parameters> where
Element: Send,
Parameters: Send,
impl<Element, Parameters> Sync for WithCustom<Element, Parameters> where
Element: Sync,
Parameters: Sync,
impl<Element, Parameters> Unpin for WithCustom<Element, Parameters> where
Element: Unpin,
Parameters: Unpin,
impl<Element, Parameters> UnwindSafe for WithCustom<Element, Parameters> where
Element: UnwindSafe,
Parameters: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more