pub struct Alternation<'i> {
pub rules: Vec<Rule<'i>>,
/* private fields */
}
Expand description
An alternation.
This is a list of alternatives. Each alternative is a Rule
.
If an alternative consists of multiple expressions (e.g. 'a' | 'b' 'c'
),
that alternative is a Rule::Group
. Note that a group’s parentheses are
removed when compiling to a regex if they aren’t required. In other words,
'a' | ('b' 'c')
compiles to a|bc
.
Fields§
§rules: Vec<Rule<'i>>
Trait Implementations§
Source§impl<'i> Clone for Alternation<'i>
impl<'i> Clone for Alternation<'i>
Source§fn clone(&self) -> Alternation<'i>
fn clone(&self) -> Alternation<'i>
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 moreAuto Trait Implementations§
impl<'i> Freeze for Alternation<'i>
impl<'i> RefUnwindSafe for Alternation<'i>
impl<'i> Send for Alternation<'i>
impl<'i> Sync for Alternation<'i>
impl<'i> Unpin for Alternation<'i>
impl<'i> UnwindSafe for Alternation<'i>
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