pub enum BackPressureError {
Saturated,
DeadlineNear,
DeadlineElapsed,
}Expand description
Errors returned by the deadline-aware back-pressure acquire path.
Distinct from AbiError so callers that want to discriminate
“saturated forever” from “saturated because the per-instance
deadline is approaching” can do so without having to inspect the
surrounding context. Conversions to AbiError (for back-compat
with the existing host-function return path) collapse both
deadline variants onto AbiError::QuotaExceeded — the guest sees
the same “no permits available” signal it already handles, and the
richer variant survives in logs / metrics that bind directly to
BackPressureError.
Variants§
Saturated
The semaphore is saturated and (for the cap-0 sentinel) will
never release a permit. Equivalent to the historical
AbiError::QuotaExceeded surface — kept under that name so
the conversion path is unambiguous.
DeadlineNear
The configured per-invocation deadline is within
DEADLINE_NEAR_WINDOW of elapsing. In-flight permits are
allowed to complete; new acquires are refused so the cohort
drains under bounded budget.
DeadlineElapsed
The configured per-invocation deadline has already elapsed. All future acquires (including pending awaiters that have not yet observed a permit) are rejected.
Implementations§
Trait Implementations§
Source§impl Clone for BackPressureError
impl Clone for BackPressureError
Source§fn clone(&self) -> BackPressureError
fn clone(&self) -> BackPressureError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BackPressureError
Source§impl Debug for BackPressureError
impl Debug for BackPressureError
impl Eq for BackPressureError
Source§impl From<BackPressureError> for AbiError
impl From<BackPressureError> for AbiError
Source§fn from(e: BackPressureError) -> Self
fn from(e: BackPressureError) -> Self
Source§impl PartialEq for BackPressureError
impl PartialEq for BackPressureError
Source§fn eq(&self, other: &BackPressureError) -> bool
fn eq(&self, other: &BackPressureError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BackPressureError
Auto Trait Implementations§
impl Freeze for BackPressureError
impl RefUnwindSafe for BackPressureError
impl Send for BackPressureError
impl Sync for BackPressureError
impl Unpin for BackPressureError
impl UnsafeUnpin for BackPressureError
impl UnwindSafe for BackPressureError
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
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§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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