pub struct Alternation {
pub rules: Vec<Rule>,
/* 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>Trait Implementations§
Source§impl Clone for Alternation
impl Clone for Alternation
Source§fn clone(&self) -> Alternation
fn clone(&self) -> Alternation
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 Freeze for Alternation
impl RefUnwindSafe for Alternation
impl Send for Alternation
impl Sync for Alternation
impl Unpin for Alternation
impl UnwindSafe for Alternation
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