pub struct ChainState {
pub in_chain: bool,
pub chain_matched: bool,
pub captures: Vec<String>,
pub chain_start: Option<usize>,
}Expand description
Track chain state during rule execution.
Fields§
§in_chain: boolWhether we’re currently in a chain.
chain_matched: boolWhether the current chain has matched so far.
captures: Vec<String>Accumulated captures from chain.
chain_start: Option<usize>Starting rule index of current chain.
Implementations§
Source§impl ChainState
impl ChainState
Sourcepub fn start_chain(&mut self, rule_idx: usize)
pub fn start_chain(&mut self, rule_idx: usize)
Start a new chain.
Sourcepub fn continue_chain(&mut self, matched: bool, captures: &[String])
pub fn continue_chain(&mut self, matched: bool, captures: &[String])
Continue chain with match result.
Trait Implementations§
Source§impl Clone for ChainState
impl Clone for ChainState
Source§fn clone(&self) -> ChainState
fn clone(&self) -> ChainState
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 ChainState
impl Debug for ChainState
Auto Trait Implementations§
impl Freeze for ChainState
impl RefUnwindSafe for ChainState
impl Send for ChainState
impl Sync for ChainState
impl Unpin for ChainState
impl UnwindSafe for ChainState
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