pub enum MatchOperation {
Push(Vec<ContextReference>),
Set {
ctx_refs: Vec<ContextReference>,
pop_count: usize,
},
Pop(usize),
None,
Branch {
name: String,
alternatives: Vec<ContextReference>,
pop_count: usize,
},
Fail(String),
Embed {
contexts: Vec<ContextReference>,
escape: EscapeInfo,
pop_count: usize,
},
}Variants§
Push(Vec<ContextReference>)
Set
Pops pop_count contexts off the stack, then pushes ctx_refs.
A plain set: is pop_count == 1; pop: N + set: is pop_count == N.
Pop(usize)
None
Branch
Branch with backtracking.
Acts like Push for the first alternative, saving a checkpoint.
If a Fail with the same name fires later, the next alternative is tried.
Fields
§
alternatives: Vec<ContextReference>Fail(String)
Trigger backtracking to the named branch point.
Embed
Embed contexts with a prioritized escape pattern. Unlike Push+with_prototype, the escape regex takes strict precedence over all other patterns — it is checked first and truncates the search region for normal patterns.
Trait Implementations§
Source§impl Clone for MatchOperation
impl Clone for MatchOperation
Source§fn clone(&self) -> MatchOperation
fn clone(&self) -> MatchOperation
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 moreSource§impl Debug for MatchOperation
impl Debug for MatchOperation
Source§impl<'de> Deserialize<'de> for MatchOperation
impl<'de> Deserialize<'de> for MatchOperation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MatchOperation
impl PartialEq for MatchOperation
Source§impl Serialize for MatchOperation
impl Serialize for MatchOperation
impl Eq for MatchOperation
impl StructuralPartialEq for MatchOperation
Auto Trait Implementations§
impl !Freeze for MatchOperation
impl RefUnwindSafe for MatchOperation
impl Send for MatchOperation
impl Sync for MatchOperation
impl Unpin for MatchOperation
impl UnsafeUnpin for MatchOperation
impl UnwindSafe for MatchOperation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.