pub enum TimerKey {
Id(String),
Seq(u64),
After {
delay: AfterDelay,
state_id: String,
},
StateTimeout {
state_id: String,
},
Event(Box<Value>),
}Expand description
A machine’s logical timer key (XState’s getTimerKey: { id }, { seq }
or { event } holding a lifecycle event’s identity or another event),
typed so that scheduling, cancelling and matching timers build no JSON.
Variants§
Id(String)
{ id }.
Seq(u64)
{ seq }.
After
{ event: { type: "xstate.after", delay, stateId } }.
StateTimeout
{ event: { type: "xstate.timeout.state", stateId } }.
Event(Box<Value>)
{ event }: any other object with a string type (boxed: rare).
Implementations§
Trait Implementations§
impl StructuralPartialEq for TimerKey
Auto Trait Implementations§
impl Forget for TimerKey
impl Freeze for TimerKey
impl Move for TimerKey
impl RefUnwindSafe for TimerKey
impl Send for TimerKey
impl Sync for TimerKey
impl Unpin for TimerKey
impl UnsafeUnpin for TimerKeywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Value is !null: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
impl UnwindSafe for TimerKey
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