Enum pomsky_syntax::exprs::Rule
source · [−]pub enum Rule<'i> {
Literal(Literal<'i>),
CharClass(CharClass),
Group(Group<'i>),
Alternation(Alternation<'i>),
Repetition(Box<Repetition<'i>>),
Boundary(Boundary),
Lookaround(Box<Lookaround<'i>>),
Variable(Variable<'i>),
Reference(Reference<'i>),
Range(Range),
StmtExpr(Box<StmtExpr<'i>>),
Grapheme,
}
Expand description
A parsed pomsky expression, which might contain more sub-expressions.
Variants
Literal(Literal<'i>)
A string literal
CharClass(CharClass)
A character class
Group(Group<'i>)
A group, i.e. a sequence of rules, possibly wrapped in parentheses.
Alternation(Alternation<'i>)
An alternation, i.e. a list of alternatives; at least one of them has to match.
Repetition(Box<Repetition<'i>>)
A repetition, i.e. a expression that must be repeated. The number of required repetitions is constrained by a lower and possibly an upper bound.
Boundary(Boundary)
A boundary (start of string, end of string or word boundary).
Lookaround(Box<Lookaround<'i>>)
A (positive or negative) lookahead or lookbehind.
Variable(Variable<'i>)
An variable that has been declared before.
Reference(Reference<'i>)
A backreference or forward reference.
Range(Range)
A range of integers
StmtExpr(Box<StmtExpr<'i>>)
An expression preceded by a modifier such as enable lazy;
Grapheme
A Unicode grapheme
Implementations
Trait Implementations
Auto Trait Implementations
impl<'i> RefUnwindSafe for Rule<'i>
impl<'i> Send for Rule<'i>
impl<'i> Sync for Rule<'i>
impl<'i> Unpin for Rule<'i>
impl<'i> UnwindSafe for Rule<'i>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more