pub enum NodeKind {
Empty,
Literal(u32),
Any,
Class(Class),
ClassSet(ClassExpr),
Concat(Vec<Node>),
Alt(Vec<Node>),
Repeat {
node: Box<Node>,
min: u64,
max: Option<u64>,
greedy: bool,
},
Group {
capture: Option<u32>,
name: Option<String>,
node: Box<Node>,
},
FlagGroup {
delta: FlagDelta,
node: Box<Node>,
},
Assert(Assertion),
Look {
ahead: bool,
negate: bool,
node: Box<Node>,
},
}Expand description
Node shape.
Variants§
Empty
Matches the empty string.
Literal(u32)
One code point.
Any
.
Class(Class)
Class or shorthand.
ClassSet(ClassExpr)
Class with nesting or set operations (Rust).
Concat(Vec<Node>)
Sequence.
Alt(Vec<Node>)
Alternation, in source order.
Repeat
Repetition. max == None is unbounded.
Fields
Group
Group. Capture status does not affect the language but is kept.
Fields
FlagGroup
Group with scoped flag changes.
Assert(Assertion)
Zero-width assertion.
Look
Lookahead or lookbehind.
Trait Implementations§
impl Eq for NodeKind
impl StructuralPartialEq for NodeKind
Auto Trait Implementations§
impl Forget for NodeKind
impl Freeze for NodeKind
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnsafeUnpin for NodeKind
impl UnwindSafe for NodeKind
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