pub enum ClaimOutcome {
Claimed(Command),
AlreadyClaimed,
RetryLater(String),
Failed(String),
}Expand description
Outcome of an attempt to claim a command from the source.
The four variants mirror the worker’s pre-PR-2d-1 inline
ClaimResult enum (in crate::client::ControlPlaneClient):
- Claimed: this worker successfully owns the command. Caller
should
ackthe source handle and dispatch the command. - AlreadyClaimed: another worker raced us and already owns
the command. Caller should
ackthe source handle (no redelivery needed) and skip dispatch. - RetryLater: claim failed transiently (overload, contention,
network blip). Caller should
nackthe source handle so the source’s redelivery policy gives another worker a shot. - Failed: claim failed terminally (catalog mismatch, malformed
command, permission denied). Caller should
nackand emit a diagnostic event so the failure is visible.
Variants§
Trait Implementations§
Source§impl Clone for ClaimOutcome
impl Clone for ClaimOutcome
Source§fn clone(&self) -> ClaimOutcome
fn clone(&self) -> ClaimOutcome
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 Freeze for ClaimOutcome
impl RefUnwindSafe for ClaimOutcome
impl Send for ClaimOutcome
impl Sync for ClaimOutcome
impl Unpin for ClaimOutcome
impl UnsafeUnpin for ClaimOutcome
impl UnwindSafe for ClaimOutcome
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
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