pub enum TransitionCheck {
Accepted,
Unhandled,
Rejected(Vec<TransitionRejection>),
Partial(Vec<TransitionRejection>),
}Expand description
What a snapshot would do with an event, without taking it, as XState’s
TransitionCheck (snapshot.check(event), since XState
6.0.0-beta.6). An event is accepted when a transition it selects has a
target or an effect (a transition function, context or actions);
unhandled when none does, when it selects none, or when the snapshot is
not active; rejected when every transition it selects with an effect
rejects it; partial when one region accepts it and another rejects it.
It serializes to XState’s shape, { "status", "rejections"? }.
Variants§
Accepted
Unhandled
Rejected(Vec<TransitionRejection>)
The rejections, in the order of the transitions that gave them.
Partial(Vec<TransitionRejection>)
The rejections of the regions that rejected the event, which others accept.
Implementations§
Source§impl TransitionCheck
impl TransitionCheck
Sourcepub fn status(&self) -> &'static str
pub fn status(&self) -> &'static str
XState’s status: accepted, unhandled, rejected or partial.
Sourcepub fn rejections(&self) -> &[TransitionRejection]
pub fn rejections(&self) -> &[TransitionRejection]
The rejections: none unless rejected or partial.