pub enum Alternative<Input> {
Optional(Optional<Input>),
Text(Input),
}
Expand description
alternative
defined in the grammar spec.
See parse::alternative()
for the detailed grammar and examples.
Variants§
Trait Implementations§
Source§impl<Input: Clone> Clone for Alternative<Input>
impl<Input: Clone> Clone for Alternative<Input>
Source§fn clone(&self) -> Alternative<Input>
fn clone(&self) -> Alternative<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 Alternative<Input>
impl<Input: Debug> Debug for Alternative<Input>
Source§impl<I> IntoRegexCharIter<I> for Alternative<I>
Available on crate feature into-regex
only.
impl<I> IntoRegexCharIter<I> for Alternative<I>
Available on crate feature
into-regex
only.Source§impl<Input: PartialEq> PartialEq for Alternative<Input>
impl<Input: PartialEq> PartialEq for Alternative<Input>
impl<Input: Copy> Copy for Alternative<Input>
impl<Input: Eq> Eq for Alternative<Input>
impl<Input> StructuralPartialEq for Alternative<Input>
Auto Trait Implementations§
impl<Input> Freeze for Alternative<Input>where
Input: Freeze,
impl<Input> RefUnwindSafe for Alternative<Input>where
Input: RefUnwindSafe,
impl<Input> Send for Alternative<Input>where
Input: Send,
impl<Input> Sync for Alternative<Input>where
Input: Sync,
impl<Input> Unpin for Alternative<Input>where
Input: Unpin,
impl<Input> UnwindSafe for Alternative<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