#[non_exhaustive]pub enum Schedule {
Every(Duration),
EveryTick,
Continuous,
DailyUtc {
hour: u8,
minute: u8,
},
}Expand description
When a service runs (see ServiceHost for the exact rules).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Every(Duration)
At most this often, measured from launch to launch; the first run is at once. Runs share the host’s concurrency limit.
EveryTick
On every tick and wake-up, for cycle work that must not wait behind
Schedule::Every services.
Continuous
Long-lived work, started once and restarted if it ends.
DailyUtc
Once a day at hour:minute UTC, the first time at the next such
moment after the host starts. Runs share the host’s concurrency
limit.
Implementations§
Trait Implementations§
impl Copy for Schedule
impl Eq for Schedule
impl StructuralPartialEq for Schedule
Auto Trait Implementations§
impl Forget for Schedule
impl Freeze for Schedule
impl Move for Schedule
impl RefUnwindSafe for Schedule
impl Send for Schedule
impl Sync for Schedule
impl Unpin for Schedule
impl UnsafeUnpin for Schedule
impl UnwindSafe for Schedule
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