pub enum TimerCmd {
Schedule {
tag: u32,
delay: Duration,
handle: HandleId,
},
ScheduleCallback {
tag: u32,
delay: Duration,
callback: TimerCallback,
},
Cancel {
tag: u32,
},
CancelAll,
}Expand description
Command sent from the operator fn (sync) to the timer task (async).
Variants§
Schedule
Schedule a timer: after delay, emit handle on the node.
If a timer with the same tag is already pending, it is cancelled
and the old handle is released.
ScheduleCallback
Schedule a callback-only timer: after delay, invoke callback.
No handle emission — the callback manages state and may call
Core::emit itself. Used by operators (debounce, throttle) that
need finer control than the emit-on-fire pattern.
Cancel
Cancel a pending timer by tag. The held handle (if any) is released. Callback-only timers have no handle to release.
CancelAll
Cancel all pending timers and release all held handles.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimerCmd
impl !RefUnwindSafe for TimerCmd
impl Send for TimerCmd
impl Sync for TimerCmd
impl Unpin for TimerCmd
impl UnsafeUnpin for TimerCmd
impl !UnwindSafe for TimerCmd
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