pub enum Schedule {
First,
Startup,
Run,
Fixed(Duration),
Shutdown,
Last,
}Expand description
Schedule determines when a system runs during the app lifecycle
Variants§
First
Runs before service workers spawn, blocks until complete (DB migrations, config validation)
Startup
Runs after service workers spawn, blocks until complete (cache warming via Client)
Run
Spawns as background task, runs until shutdown (event loops, long-running workers)
Fixed(Duration)
Spawns as background task, runs repeatedly on interval (metrics, health checks)
Shutdown
Runs when shutdown triggered, blocks until complete (flush buffers, save state)
Last
Runs after everything stopped, blocks until complete (final cleanup)
Trait Implementations§
impl Copy for Schedule
impl Eq for Schedule
impl StructuralPartialEq for Schedule
Auto Trait Implementations§
impl Freeze for Schedule
impl RefUnwindSafe for Schedule
impl Send for Schedule
impl Sync for Schedule
impl Unpin for Schedule
impl UnwindSafe for Schedule
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)