pub struct FifoOutcome<Role, Job, WorkerResult> { /* private fields */ }Expand description
Complete customer-visible progress or terminal outcome for FIFO work.
The value is opaque so a pool can retain a non-Clone application role
while an outcome borrows the same immutable role name. Exact consuming
projections return owned payloads and results without exposing shared
storage.
Implementations§
Source§impl<Role, Job, WorkerResult> FifoOutcome<Role, Job, WorkerResult>
impl<Role, Job, WorkerResult> FifoOutcome<Role, Job, WorkerResult>
Sourcepub const fn kind(&self) -> FifoOutcomeKind
pub const fn kind(&self) -> FifoOutcomeKind
Identify the customer-visible alternative without consuming it.
Sourcepub fn role(&self) -> Option<&Role>
pub fn role(&self) -> Option<&Role>
Borrow the semantic worker role carried by a terminal assigned outcome.
Sourcepub const fn worker_result(&self) -> Option<&WorkerResult>
pub const fn worker_result(&self) -> Option<&WorkerResult>
Borrow a completed worker result, when present.
Sourcepub fn into_accepted(self) -> Result<(SubmissionId, JobId), Self>
pub fn into_accepted(self) -> Result<(SubmissionId, JobId), Self>
Consume an accepted-admission outcome.
Sourcepub fn into_rejected(
self,
) -> Result<(SubmissionId, Job, AdmissionRejection), Self>
pub fn into_rejected( self, ) -> Result<(SubmissionId, Job, AdmissionRejection), Self>
Consume a rejected-admission outcome and recover its complete payload.
Sourcepub fn into_completed(self) -> Result<(JobId, WorkerResult), Self>
pub fn into_completed(self) -> Result<(JobId, WorkerResult), Self>
Consume a completed outcome after borrowing its role if needed.
Sourcepub fn into_returned_queued(
self,
) -> Result<(JobId, Job, QueuedReturnReason), Self>
pub fn into_returned_queued( self, ) -> Result<(JobId, Job, QueuedReturnReason), Self>
Consume a returned queued outcome and recover its complete payload.
Sourcepub fn into_returned_assigned(
self,
) -> Result<(JobId, Job, AssignedReturnReason), Self>
pub fn into_returned_assigned( self, ) -> Result<(JobId, Job, AssignedReturnReason), Self>
Consume a returned assigned outcome after borrowing its role if needed.