pub enum RunStoreError {
NotFound(RunId),
Duplicate(RunId),
AssigneeDescRequired,
AssigneeGenerationAhead {
slot: String,
gen: u64,
next_generation: u64,
},
AssigneeSlotRequired,
Other(String),
}Expand description
Errors surfaced by a RunStore implementation.
Variants§
NotFound(RunId)
No Run exists for the given id.
Duplicate(RunId)
create was called with an id that is already stored.
AssigneeDescRequired
A9: RunStore::acquire_assignee was called without a desc.
The record is mandatory, so the acquire is refused rather than
stored with an empty one. The store deliberately does not name an
HTTP status — the caller maps this to 400.
AssigneeGenerationAhead
A2: a record handed to RunStore::create carries a holder
whose generation is above the Run’s counter G
(current[slot].gen > next_generation), so it would be stored
already violating current = Assigned(a) ⟹ a.gen ≤ G.
The acquire path cannot produce this — it stamps gen from the
counter it just bumped — but create accepts a caller-built
RunRecord with both fields public, and that is a published
surface. Refused rather than stored: the violation is permanent
(the next acquire stamps a lower generation than the incumbent’s,
inverting the ordering G being Run-wide exists to provide) and
invisible afterwards. Callers map this to 400, same as
Self::AssigneeDescRequired.
Fields
AssigneeSlotRequired
An assignment event named no slot. Run.current is keyed by slot,
so an Assign (or a Vacant) with an empty slot names no seat to
write — it is refused rather than collapsed onto a "" key that
no operator_ref can ever resolve to. Callers map this to 400,
same as Self::AssigneeDescRequired.
Other(String)
Backend-specific failure not covered by the other variants.
Trait Implementations§
Source§impl Debug for RunStoreError
impl Debug for RunStoreError
Source§impl Display for RunStoreError
impl Display for RunStoreError
Source§impl Error for RunStoreError
impl Error for RunStoreError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for RunStoreError
impl RefUnwindSafe for RunStoreError
impl Send for RunStoreError
impl Sync for RunStoreError
impl Unpin for RunStoreError
impl UnsafeUnpin for RunStoreError
impl UnwindSafe for RunStoreError
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<E> ExternalError for E
impl<E> ExternalError for E
fn into_lua_err(self) -> Error
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