pub struct AdmissionFailureContext {
pub stage: &'static str,
pub timeout: Duration,
pub capability: Option<StorageCapability>,
pub operation: Option<String>,
pub pool_identity: Option<String>,
pub scope: Option<&'static str>,
pub retry_after_ms: Option<u64>,
}Expand description
Structured context for a pre-execution admission failure: a finite-wait pooled writer checkout timeout, a bounded write-queue enqueue timeout, or a bounded storage-admission wait (reader/writer handle slot or pooled reader checkout). All happen before SQLite executes the request, so all are safe to classify as retryable — the request was never accepted, let alone started.
Fields§
§stage: &'static strStable wire stage/code: one of WRITER_POOL_CHECKOUT_TIMEOUT_STAGE,
WRITER_QUEUE_SATURATED_STAGE, or
STORAGE_ADMISSION_TIMEOUT_STAGE.
timeout: DurationThe configured deadline that elapsed.
capability: Option<StorageCapability>Storage capability the request was scoped to, when known. The write
queue is process-local and unscoped by capability, so this is None
for WRITER_QUEUE_SATURATED_STAGE.
operation: Option<String>Storage operation name, when known.
pool_identity: Option<String>Database identity supplied by the pool that refused admission, when known.
scope: Option<&'static str>ADR-131:251 scope discriminator. Some(WRITER_ADMISSION_SCOPE)
for WRITER_QUEUE_SATURATED_STAGE; None for
WRITER_POOL_CHECKOUT_TIMEOUT_STAGE, which ADR-131 does not define a
scope for.
retry_after_ms: Option<u64>ADR-131:251 retry_after_ms hint — set equal to the admission
deadline actually applied to the rejected operation, so a retrying
caller waits at least one full admission window before retrying.
Some(timeout_ms) for WRITER_QUEUE_SATURATED_STAGE; None
otherwise.
Trait Implementations§
Source§impl Clone for AdmissionFailureContext
impl Clone for AdmissionFailureContext
Source§impl Debug for AdmissionFailureContext
impl Debug for AdmissionFailureContext
impl Eq for AdmissionFailureContext
Source§impl From<AdmissionFailureContext> for RetryableFailureContext
impl From<AdmissionFailureContext> for RetryableFailureContext
Source§fn from(context: AdmissionFailureContext) -> Self
fn from(context: AdmissionFailureContext) -> Self
Source§impl PartialEq for AdmissionFailureContext
impl PartialEq for AdmissionFailureContext
impl StructuralPartialEq for AdmissionFailureContext
Auto Trait Implementations§
impl Freeze for AdmissionFailureContext
impl RefUnwindSafe for AdmissionFailureContext
impl Send for AdmissionFailureContext
impl Sync for AdmissionFailureContext
impl Unpin for AdmissionFailureContext
impl UnsafeUnpin for AdmissionFailureContext
impl UnwindSafe for AdmissionFailureContext
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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