pub struct Job { /* private fields */ }Expand description
Named handler with optional recurring schedule, queue, and priority.
Implementations§
Source§impl Job
impl Job
pub fn new<F, Fut>(name: impl Into<String>, f: F) -> Self
Sourcepub fn queue(self, q: impl Into<String>) -> Self
pub fn queue(self, q: impl Into<String>) -> Self
Named queue for schedule enqueue and default dispatch routing.
Sourcepub fn priority(self, p: i32) -> Self
pub fn priority(self, p: i32) -> Self
Claim priority within the queue (higher first). Default priority::NORMAL.
Sourcepub fn every(self, period: Duration) -> Self
pub fn every(self, period: Duration) -> Self
Run approximately every period (slot-based dedup across instances).
Auto Trait Implementations§
impl !RefUnwindSafe for Job
impl !UnwindSafe for Job
impl Freeze for Job
impl Send for Job
impl Sync for Job
impl Unpin for Job
impl UnsafeUnpin for Job
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