pub enum TimedMessage<M> {
Instant {
message: M,
},
Delayed {
message: M,
fire_at: Instant,
},
Recurring {
factory: Box<dyn FnMut() -> M + Send>,
fire_at: Instant,
interval: Duration,
},
}Expand description
A message that can be delivered now, at certain time and optionally repeatedly.
Variants§
Trait Implementations§
Auto Trait Implementations§
impl<M> Freeze for TimedMessage<M>where
M: Freeze,
impl<M> !RefUnwindSafe for TimedMessage<M>
impl<M> Send for TimedMessage<M>where
M: Send,
impl<M> !Sync for TimedMessage<M>
impl<M> Unpin for TimedMessage<M>where
M: Unpin,
impl<M> !UnwindSafe for TimedMessage<M>
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