pub struct WithCustom<Element, Parameters> {
pub element: Element,
pub parameters: Parameters,
}
Available on crate feature
into-regex
only.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§
Source§impl<Element: Clone, Parameters: Clone> Clone for WithCustom<Element, Parameters>
impl<Element: Clone, Parameters: Clone> Clone for WithCustom<Element, Parameters>
Source§fn clone(&self) -> WithCustom<Element, Parameters>
fn clone(&self) -> WithCustom<Element, Parameters>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<I, Pars> IntoRegexCharIter<I> for WithCustom<Expression<I>, Pars>
impl<I, Pars> IntoRegexCharIter<I> for WithCustom<Expression<I>, Pars>
Source§type Iter = Chain<Chain<Once<Result<char, ParameterError<I>>>, FlatMap<Map<Zip<IntoIter<SingleExpression<I>>, Repeat<Pars>>, fn((SingleExpression<I>, Pars)) -> WithCustom<SingleExpression<I>, Pars>>, Either<<WithCustom<Parameter<I>, Pars> as IntoRegexCharIter<I>>::Iter, Either<<Alternation<I> as IntoRegexCharIter<I>>::Iter, Either<<Optional<I> as IntoRegexCharIter<I>>::Iter, Either<<Parameter<I> as IntoRegexCharIter<I>>::Iter, Map<EscapeForRegex<Map<<I as Input>::Iter, fn(<I as Input>::Item) -> char>>, fn(char) -> Result<char, ParameterError<I>>>>>>>, fn(WithCustom<SingleExpression<I>, Pars>) -> Either<<WithCustom<Parameter<I>, Pars> as IntoRegexCharIter<I>>::Iter, Either<<Alternation<I> as IntoRegexCharIter<I>>::Iter, Either<<Optional<I> as IntoRegexCharIter<I>>::Iter, Either<<Parameter<I> as IntoRegexCharIter<I>>::Iter, Map<EscapeForRegex<Map<<I as Input>::Iter, fn(<I as Input>::Item) -> char>>, fn(char) -> Result<char, ParameterError<I>>>>>>>>>, Once<Result<char, ParameterError<I>>>>
type Iter = Chain<Chain<Once<Result<char, ParameterError<I>>>, FlatMap<Map<Zip<IntoIter<SingleExpression<I>>, Repeat<Pars>>, fn((SingleExpression<I>, Pars)) -> WithCustom<SingleExpression<I>, Pars>>, Either<<WithCustom<Parameter<I>, Pars> as IntoRegexCharIter<I>>::Iter, Either<<Alternation<I> as IntoRegexCharIter<I>>::Iter, Either<<Optional<I> as IntoRegexCharIter<I>>::Iter, Either<<Parameter<I> as IntoRegexCharIter<I>>::Iter, Map<EscapeForRegex<Map<<I as Input>::Iter, fn(<I as Input>::Item) -> char>>, fn(char) -> Result<char, ParameterError<I>>>>>>>, fn(WithCustom<SingleExpression<I>, Pars>) -> Either<<WithCustom<Parameter<I>, Pars> as IntoRegexCharIter<I>>::Iter, Either<<Alternation<I> as IntoRegexCharIter<I>>::Iter, Either<<Optional<I> as IntoRegexCharIter<I>>::Iter, Either<<Parameter<I> as IntoRegexCharIter<I>>::Iter, Map<EscapeForRegex<Map<<I as Input>::Iter, fn(<I as Input>::Item) -> char>>, fn(char) -> Result<char, ParameterError<I>>>>>>>>>, Once<Result<char, ParameterError<I>>>>
Type of
Iterator
performing the expansion.Source§impl<I, P> IntoRegexCharIter<I> for WithCustom<Parameter<I>, P>
impl<I, P> IntoRegexCharIter<I> for WithCustom<Parameter<I>, P>
Source§type Iter = Either<Once<Result<char, ParameterError<I>>>, Either<Either<Either<Map<Chars<'static>, fn(char) -> Result<char, ParameterError<I>>>, Map<OwnedChars, fn(char) -> Result<char, ParameterError<I>>>>, Once<Result<char, ParameterError<I>>>>, Either<Chain<Chain<Map<Chars<'static>, fn(char) -> Result<char, ParameterError<I>>>, Map<OwnedChars, fn(char) -> Result<char, ParameterError<I>>>>, Once<Result<char, ParameterError<I>>>>, Chain<Chain<Once<Result<char, ParameterError<I>>>, Map<<<P as Provider<I>>::Value as Input>::Iter, fn(<<P as Provider<I>>::Value as Input>::Item) -> Result<char, ParameterError<I>>>>, Once<Result<char, ParameterError<I>>>>>>>
type Iter = Either<Once<Result<char, ParameterError<I>>>, Either<Either<Either<Map<Chars<'static>, fn(char) -> Result<char, ParameterError<I>>>, Map<OwnedChars, fn(char) -> Result<char, ParameterError<I>>>>, Once<Result<char, ParameterError<I>>>>, Either<Chain<Chain<Map<Chars<'static>, fn(char) -> Result<char, ParameterError<I>>>, Map<OwnedChars, fn(char) -> Result<char, ParameterError<I>>>>, Once<Result<char, ParameterError<I>>>>, Chain<Chain<Once<Result<char, ParameterError<I>>>, Map<<<P as Provider<I>>::Value as Input>::Iter, fn(<<P as Provider<I>>::Value as Input>::Item) -> Result<char, ParameterError<I>>>>, Once<Result<char, ParameterError<I>>>>>>>
Type of
Iterator
performing the expansion.Source§impl<I, Pars> IntoRegexCharIter<I> for WithCustom<SingleExpression<I>, Pars>
impl<I, Pars> IntoRegexCharIter<I> for WithCustom<SingleExpression<I>, Pars>
Source§type Iter = Either<<WithCustom<Parameter<I>, Pars> as IntoRegexCharIter<I>>::Iter, Either<<Alternation<I> as IntoRegexCharIter<I>>::Iter, Either<<Optional<I> as IntoRegexCharIter<I>>::Iter, Either<<Parameter<I> as IntoRegexCharIter<I>>::Iter, Map<EscapeForRegex<Map<<I as Input>::Iter, fn(<I as Input>::Item) -> char>>, fn(char) -> Result<char, ParameterError<I>>>>>>>
type Iter = Either<<WithCustom<Parameter<I>, Pars> as IntoRegexCharIter<I>>::Iter, Either<<Alternation<I> as IntoRegexCharIter<I>>::Iter, Either<<Optional<I> as IntoRegexCharIter<I>>::Iter, Either<<Parameter<I> as IntoRegexCharIter<I>>::Iter, Map<EscapeForRegex<Map<<I as Input>::Iter, fn(<I as Input>::Item) -> char>>, fn(char) -> Result<char, ParameterError<I>>>>>>>
Type of
Iterator
performing the expansion.impl<Element: Copy, Parameters: Copy> Copy for WithCustom<Element, Parameters>
Auto Trait Implementations§
impl<Element, Parameters> Freeze for WithCustom<Element, Parameters>
impl<Element, Parameters> RefUnwindSafe for WithCustom<Element, Parameters>where
Element: RefUnwindSafe,
Parameters: RefUnwindSafe,
impl<Element, Parameters> Send for WithCustom<Element, Parameters>
impl<Element, Parameters> Sync for WithCustom<Element, Parameters>
impl<Element, Parameters> Unpin for WithCustom<Element, Parameters>
impl<Element, Parameters> UnwindSafe for WithCustom<Element, Parameters>where
Element: UnwindSafe,
Parameters: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more