pub enum Admission {
Fresh(RunOutcome),
Replayed(RunOutcome),
InFlight(RunId),
}Expand description
What an idempotent admission did.
A duplicate comes back as an answer rather than an error: a caller that retried wants the original run, not a conflict it has to interpret.
Exhaustive, unlike the error types: a key is unused, or held by a run that
has rested, or held by one that has not. There is no fourth state to leave
room for, and #[non_exhaustive] would cost every caller a _ arm that
means nothing.
Variants§
Fresh(RunOutcome)
The key was unused. This run is the one it admitted.
Replayed(RunOutcome)
The key already admitted a run that has reached a resting point — concluded, or suspended waiting for something. Its answer, again.
A suspension counts, and that is the case this exists for: a run parked on a four-eyes decision has already opened the task, so a redelivery that admitted would put a second identical approval in front of a reviewer.
Carries no output. A step’s result is reconstructed by replay rather
than stored, so what the journal answers is what happened — status,
reason, chain head. Re-derive the value with replay
under Mode::Strict, which performs no external effect.
InFlight(RunId)
The key already admitted a run that has not rested yet — still executing, or abandoned and awaiting the recovery sweep.
The honest answer to an emitter is accepted, already in progress — a 200 or 202 naming this run, never a retry-provoking failure.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Admission
impl RefUnwindSafe for Admission
impl Send for Admission
impl Sync for Admission
impl Unpin for Admission
impl UnsafeUnpin for Admission
impl UnwindSafe for Admission
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
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> ⓘ
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> ⓘ
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