pub struct CaptureEvent {
pub rule_id: i32,
pub start_pos: i32,
pub occurrence_start_pos: i32,
pub hidden_suffix_bytes: i32,
pub hidden_stop_bytes: i32,
pub stop_capture_targets: Vec<CaptureOccurrence>,
}Expand description
Recorded when a captured (or capture-hiding) rule is completed during parsing. The matched
span is [start_pos, r) in input positions, where r is the history row at which the event
is recorded.
Fields§
§rule_id: i32The id of the completed rule.
start_pos: i32The position where the rule started matching. NO_PREV_INPUT_POS means position 0 (the
rule acts as the root).
occurrence_start_pos: i32The unadjusted start position of this rule occurrence. Differs from start_pos for the
zero-width event inserted after a dynamic-dispatch marker.
Number of trailing bytes hidden only from this rule’s own capture.
Number of trailing bytes hidden from every containing capture.
stop_capture_targets: Vec<CaptureOccurrence>The captured rule occurrences whose concrete Earley parent chains contain this stop completion. Includes this rule’s occurrence when the rule itself is captured.
Trait Implementations§
Source§impl Clone for CaptureEvent
impl Clone for CaptureEvent
Source§impl Debug for CaptureEvent
impl Debug for CaptureEvent
impl Eq for CaptureEvent
Source§impl PartialEq for CaptureEvent
impl PartialEq for CaptureEvent
impl StructuralPartialEq for CaptureEvent
Auto Trait Implementations§
impl Freeze for CaptureEvent
impl RefUnwindSafe for CaptureEvent
impl Send for CaptureEvent
impl Sync for CaptureEvent
impl Unpin for CaptureEvent
impl UnsafeUnpin for CaptureEvent
impl UnwindSafe for CaptureEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more