pub enum Effect {
Spawn(ActorRef),
Start(ActorRef),
Stop(ActorRef),
Cancel(TimerKey),
DelayedRaise {
key: TimerKey,
delay: u64,
occurrence: u64,
},
SendTo {
target: ActorRef,
event: Value,
},
Terminate,
External(ExternalSpec),
}Expand description
An effect returned by a logic’s transition, as XState’s ExecutableEffect.
Variants§
Spawn(ActorRef)
A child was allocated (already reflected in the system).
Start(ActorRef)
Start a child allocated in this transition.
Stop(ActorRef)
Stop a child.
Cancel(TimerKey)
Cancel the logical timer with this key ({id}, {seq} or {event}).
DelayedRaise
Schedule the logical timer with this key; its notification carries
the scheduling’s occurrence.
SendTo
Deliver an event to another actor.
Terminate
The actor reached done or error: notify its parent.
External(ExternalSpec)
Work for the host.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Effect
impl !UnwindSafe for Effect
impl Forget for Effect
impl Freeze for Effectwhere
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const Value is !null: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
*const ArcInner<dyn Fn() -> Result<(), String> + Send + Sync> is !null: Freeze,
PhantomData<ArcInner<dyn Fn() -> Result<(), String> + Send + Sync>>: Freeze,
impl Move for Effect
impl Send for Effect
impl Sync for Effect
impl Unpin for Effect
impl UnsafeUnpin for Effectwhere
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Value is !null: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
*const ArcInner<dyn Fn() -> Result<(), String> + Send + Sync> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn() -> Result<(), String> + Send + Sync>>: UnsafeUnpin,
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