pub enum Instruction<S, E> {
Accept,
Epsilon {
next: StateId,
},
Symbol {
symbol: S,
next: StateId,
},
Any {
next: StateId,
},
Extension {
extension: E,
next: StateId,
},
Split {
alternatives: Vec<StateId>,
},
Tag {
capture: CaptureId,
boundary: TagBoundary,
next: StateId,
},
Anchor {
anchor: Anchor,
next: StateId,
},
Assertion {
assertion: AssertionId,
next: StateId,
},
Repeat {
body: StateId,
exit: StateId,
min: usize,
max: Option<usize>,
greedy: bool,
},
}Expand description
The action performed by one automaton state.
Variants§
Accept
Accept the pattern.
Epsilon
Continue without consuming input.
Symbol
Consume one exact symbol.
Any
Consume any one symbol.
Extension
Delegate symbol recognition to an admitted extension.
Split
Choose either successor without consuming input.
Tag
Record a capture boundary without consuming input.
Fields
§
boundary: TagBoundaryBoundary being recorded.
Anchor
Test a subject boundary without consuming input.
Assertion
Invoke a separately compiled zero-width assertion.
Fields
§
assertion: AssertionIdStable assertion identifier.
Repeat
Enter a bounded or unbounded repetition loop.
Implementations§
Trait Implementations§
Source§impl<S: Clone, E: Clone> Clone for Instruction<S, E>
impl<S: Clone, E: Clone> Clone for Instruction<S, E>
Source§fn clone(&self) -> Instruction<S, E>
fn clone(&self) -> Instruction<S, E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<S: Eq, E: Eq> Eq for Instruction<S, E>
impl<S: PartialEq, E: PartialEq> StructuralPartialEq for Instruction<S, E>
Auto Trait Implementations§
impl<S, E> Freeze for Instruction<S, E>
impl<S, E> RefUnwindSafe for Instruction<S, E>where
S: RefUnwindSafe,
E: RefUnwindSafe,
impl<S, E> Send for Instruction<S, E>
impl<S, E> Sync for Instruction<S, E>
impl<S, E> Unpin for Instruction<S, E>
impl<S, E> UnsafeUnpin for Instruction<S, E>where
S: UnsafeUnpin,
E: UnsafeUnpin,
impl<S, E> UnwindSafe for Instruction<S, E>where
S: UnwindSafe,
E: 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