pub struct TickMsg {
pub id: i32,
pub timeout: bool,
/* private fields */
}Expand description
TickMsg is a message that is sent on every timer tick.
Fields§
§id: i32ID is the identifier of the timer that sends the message. This makes it possible to determine which timer a tick belongs to when there are multiple timers running.
Note, however, that a timer will reject ticks from other timers, so it’s safe to flow all TickMsgs through all timers and have them still behave appropriately.
timeout: boolTimeout returns whether or not this tick is a timeout tick. You can alternatively listen for TimeoutMsg.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TickMsg
impl RefUnwindSafe for TickMsg
impl Send for TickMsg
impl Sync for TickMsg
impl Unpin for TickMsg
impl UnsafeUnpin for TickMsg
impl UnwindSafe for TickMsg
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