pub enum SingleExpression<Input> {
Alternation(Alternation<Input>),
Optional(Optional<Input>),
Parameter(Parameter<Input>),
Text(Input),
Whitespaces(Input),
}
Expand description
single-expression
defined in the grammar spec, representing a single
entry of an Expression
.
See parse::single_expression()
for the detailed grammar and examples.
Variants§
Alternation(Alternation<Input>)
alternation
expression.
Optional(Optional<Input>)
optional
expression.
Parameter(Parameter<Input>)
parameter
expression.
Text(Input)
text-without-whitespace+
expression.
Whitespaces(Input)
whitespace+
expression.
Trait Implementations§
Source§impl<Input: Clone> Clone for SingleExpression<Input>
impl<Input: Clone> Clone for SingleExpression<Input>
Source§fn clone(&self) -> SingleExpression<Input>
fn clone(&self) -> SingleExpression<Input>
Returns a copy 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<Input: Debug> Debug for SingleExpression<Input>
impl<Input: Debug> Debug for SingleExpression<Input>
Source§impl<I> IntoRegexCharIter<I> for SingleExpression<I>
Available on crate feature into-regex
only.
impl<I> IntoRegexCharIter<I> for SingleExpression<I>
Available on crate feature
into-regex
only.Source§type 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<<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.Source§impl<Input: PartialEq> PartialEq for SingleExpression<Input>
impl<Input: PartialEq> PartialEq for SingleExpression<Input>
impl<Input: Eq> Eq for SingleExpression<Input>
impl<Input> StructuralPartialEq for SingleExpression<Input>
Auto Trait Implementations§
impl<Input> Freeze for SingleExpression<Input>where
Input: Freeze,
impl<Input> RefUnwindSafe for SingleExpression<Input>where
Input: RefUnwindSafe,
impl<Input> Send for SingleExpression<Input>where
Input: Send,
impl<Input> Sync for SingleExpression<Input>where
Input: Sync,
impl<Input> Unpin for SingleExpression<Input>where
Input: Unpin,
impl<Input> UnwindSafe for SingleExpression<Input>where
Input: 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