pub struct Job<D = ()> {
pub job_id: String,
pub execution_resource_id: String,
pub guard_scope: ExecutionGuardScope,
pub schedule: Schedule,
pub max_runs: Option<u32>,
pub missed_run_policy: MissedRunPolicy,
pub overlap_policy: OverlapPolicy,
/* private fields */
}Fields§
§job_id: String§execution_resource_id: String§guard_scope: ExecutionGuardScope§schedule: Schedule§max_runs: Option<u32>§missed_run_policy: MissedRunPolicy§overlap_policy: OverlapPolicyImplementations§
Source§impl<D> Job<D>
impl<D> Job<D>
Sourcepub fn with_max_runs(self, max_runs: u32) -> Self
pub fn with_max_runs(self, max_runs: u32) -> Self
Limit how many triggers this job can consume before it exits.
This applies to Schedule::Interval, Schedule::AtTimes, and
Schedule::Cron.
A value of 0 makes the job exit immediately without running.
pub fn with_missed_run_policy(self, policy: MissedRunPolicy) -> Self
pub fn with_overlap_policy(self, policy: OverlapPolicy) -> Self
pub fn with_execution_resource_id(self, resource_id: impl Into<String>) -> Self
pub fn with_guard_scope(self, scope: ExecutionGuardScope) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for Job<D>
impl<D = ()> !RefUnwindSafe for Job<D>
impl<D> Send for Job<D>
impl<D> Sync for Job<D>
impl<D> Unpin for Job<D>
impl<D> UnsafeUnpin for Job<D>
impl<D = ()> !UnwindSafe for Job<D>
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