#[repr(C, u16)]pub enum EffectOp {
CaptureNode,
ClearCurrent,
StartArray,
PushElement,
EndArray,
StartObject,
EndObject,
Field(DataFieldId),
StartVariant(VariantTagId),
EndVariant,
ToString,
}Expand description
Effect operation in the IR effect stream.
Effects are executed sequentially after a successful match. They manipulate a value stack to construct structured output.
Variants§
CaptureNode
Store matched node as current value. Only valid on transitions with Node/Anonymous/Wildcard matcher.
ClearCurrent
Clear current value (set to None). Used on skip paths for optional captures.
StartArray
Push empty array onto stack.
PushElement
Move current value into top array.
EndArray
Pop array from stack into current.
StartObject
Push empty object onto stack.
EndObject
Pop object from stack into current.
Field(DataFieldId)
Move current value into top object at field.
StartVariant(VariantTagId)
Push variant container with tag onto stack.
EndVariant
Pop variant, wrap current, set as current.
ToString
Replace current Node with its source text.
Trait Implementations§
impl Copy for EffectOp
impl Eq for EffectOp
impl StructuralPartialEq for EffectOp
Auto Trait Implementations§
impl Freeze for EffectOp
impl RefUnwindSafe for EffectOp
impl Send for EffectOp
impl Sync for EffectOp
impl Unpin for EffectOp
impl UnwindSafe for EffectOp
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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.