pub struct EveryMsgInternal {
pub duration: Duration,
pub func: Box<dyn Fn(Duration) -> Msg + Send>,
pub cancellation_token: CancellationToken,
pub timer_id: u64,
}Expand description
An internal message used to start a recurring timer.
This structure is used internally by the framework to manage recurring
timers created with the every() command. It contains the timer’s
configuration and a cancellation token for stopping the timer.
§Note
This is not exposed as a public API and should not be used directly
by application code. Use the every() command function instead.
Fields§
§duration: DurationInterval between timer ticks.
func: Box<dyn Fn(Duration) -> Msg + Send>Function invoked on each tick producing a message.
cancellation_token: CancellationTokenToken used to cancel the running timer.
timer_id: u64Unique identifier for this timer instance.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EveryMsgInternal
impl !RefUnwindSafe for EveryMsgInternal
impl Send for EveryMsgInternal
impl !Sync for EveryMsgInternal
impl Unpin for EveryMsgInternal
impl !UnwindSafe for EveryMsgInternal
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