pub struct CompareAndRequeueJob<'a> {
pub scope: JobScope,
pub job_id: Uuid,
pub expected_status: RequeueableJobStatus,
pub expected_run_number: i32,
pub state_policy: JobRequeueStatePolicy,
pub reason: &'a str,
}Fields§
§scope: JobScope§job_id: Uuid§expected_status: RequeueableJobStatus§expected_run_number: i32§state_policy: JobRequeueStatePolicy§reason: &'a strImplementations§
Source§impl<'a> CompareAndRequeueJob<'a>
impl<'a> CompareAndRequeueJob<'a>
Sourcepub fn from_observed_job(
observed: &JobQueueRecord,
state_policy: JobRequeueStatePolicy,
reason: &'a str,
) -> Result<Self, NonRequeueableJobStatusError>
pub fn from_observed_job( observed: &JobQueueRecord, state_policy: JobRequeueStatePolicy, reason: &'a str, ) -> Result<Self, NonRequeueableJobStatusError>
Builds a compare-and-requeue request from an observed terminal job.
The job’s exact tenant scope, identifier, status, and run number are copied into the request so callers cannot accidentally turn a scoped observation into a wildcard or lose the optimistic-concurrency fence.
§Errors
Returns NonRequeueableJobStatusError unless the observation is
canceled or dead-lettered. Successful jobs require a separate replay
policy and pending or leased jobs are not recovery candidates.
Trait Implementations§
Source§impl<'a> Clone for CompareAndRequeueJob<'a>
impl<'a> Clone for CompareAndRequeueJob<'a>
Source§fn clone(&self) -> CompareAndRequeueJob<'a>
fn clone(&self) -> CompareAndRequeueJob<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for CompareAndRequeueJob<'a>
impl<'a> RefUnwindSafe for CompareAndRequeueJob<'a>
impl<'a> Send for CompareAndRequeueJob<'a>
impl<'a> Sync for CompareAndRequeueJob<'a>
impl<'a> Unpin for CompareAndRequeueJob<'a>
impl<'a> UnsafeUnpin for CompareAndRequeueJob<'a>
impl<'a> UnwindSafe for CompareAndRequeueJob<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more