pub enum TriggerMatch {
Input {
variant: InputVariantId,
bindings: Vec<FieldId>,
},
Signal {
variant: SignalVariantId,
bindings: Vec<FieldId>,
},
}Expand description
Typed trigger match for a transition — the variant ID is carried at the right level of the sum discriminator.
Each transition fires on either an input or a signal; the TriggerMatch
sum threads the correct typed identity through each arm so there is no
stringly-typed variant field anywhere in the schema. The DSL macro
emits the concrete arm at expansion time — Input { variant: InputVariantId::parse(...) } or Signal { variant: SignalVariantId::parse(...) }.
Variants§
Implementations§
Source§impl TriggerMatch
impl TriggerMatch
Sourcepub fn kind(&self) -> TriggerKind
pub fn kind(&self) -> TriggerKind
Structural trigger kind (convenience projection for validators that
still consult the kind/variant split).
Sourcepub fn variant_str(&self) -> &str
pub fn variant_str(&self) -> &str
Untyped slug accessor for the matched variant. Use TriggerMatch
directly when you need the typed identity.
Trait Implementations§
Source§impl Clone for TriggerMatch
impl Clone for TriggerMatch
Source§fn clone(&self) -> TriggerMatch
fn clone(&self) -> TriggerMatch
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 moreSource§impl Debug for TriggerMatch
impl Debug for TriggerMatch
impl Eq for TriggerMatch
Source§impl PartialEq for TriggerMatch
impl PartialEq for TriggerMatch
Source§fn eq(&self, other: &TriggerMatch) -> bool
fn eq(&self, other: &TriggerMatch) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TriggerMatch
Auto Trait Implementations§
impl Freeze for TriggerMatch
impl RefUnwindSafe for TriggerMatch
impl Send for TriggerMatch
impl Sync for TriggerMatch
impl Unpin for TriggerMatch
impl UnsafeUnpin for TriggerMatch
impl UnwindSafe for TriggerMatch
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.