pub enum AccountFailureKind {
Show 27 variants
CoolingDown,
Exhausted,
ModelUnavailable,
UsageRateLimited,
UsageTimeout,
UsageUpstream,
UsageTransport,
UsageMalformed,
UsageUnauthorized,
RefreshTransient,
RefreshLockBusy,
RefreshOther,
RefreshRejected,
RefreshActionRequired,
CredentialMissing,
CredentialStore,
AuthError,
Unsupported,
QuotaUnknown,
StaleSnapshot,
WindowUnknown,
ModelUnknown,
NoLimitEvidence,
Excluded,
NotPresent,
InvalidLabel,
Unknown,
}Expand description
Why one account could not serve a request, as a stable snake_case kind: a failed observation (usage read, token refresh, credential store) or the policy verdict on a good one. Secret-free; safe for logs and users.
Variants§
CoolingDown
A provider limit was reported for the account (client cooldown).
Exhausted
A usage window is at its limit.
The provider reports the requested model as used up.
UsageRateLimited
The usage endpoint itself answered 429. Not proof of exhaustion.
UsageTimeout
UsageUpstream
The usage endpoint answered another non-2xx status (or a redirect).
UsageTransport
UsageMalformed
The usage response could not be parsed (or was too large).
The usage endpoint rejected the access token (401/403).
RefreshTransient
The token refresh failed for a network/provider reason (5xx, 429, timeout).
RefreshLockBusy
Another refresh of the account was still running.
RefreshOther
A local refresh failure (lock file I/O, the refresh task, a forced- refresh cooldown).
RefreshRejected
The token endpoint rejected the login (e.g. invalid_grant).
RefreshActionRequired
The user must act outside synaps (corrupt store, billing).
CredentialMissing
The slot disappeared between listing and reading.
CredentialStore
The credential store could not be read.
AuthError
The credential was rejected; no finer cause recorded.
Unsupported
No usage adapter for the provider.
QuotaUnknown
No reading and no recorded cause.
StaleSnapshot
WindowUnknown
ModelUnknown
NoLimitEvidence
Excluded
Excluded by the caller (e.g. a duplicate of another slot’s seat).
NotPresent
InvalidLabel
Unknown
A kind this build does not know (from a newer daemon). Claims no remedy: not transient, not a login, not an action, not limited.
Implementations§
Source§impl AccountFailureKind
impl AccountFailureKind
pub fn as_str(self) -> &'static str
Sourcepub fn needs_login(self) -> bool
pub fn needs_login(self) -> bool
Only a new login for the account can fix it.
Sourcepub fn is_transient(self) -> bool
pub fn is_transient(self) -> bool
Capacity is unproven, not absent: the same request can succeed later without the user doing anything.
Sourcepub fn is_limited(self) -> bool
pub fn is_limited(self) -> bool
The account is at a provider limit (reported or measured).
Sourcepub fn needs_action(self) -> bool
pub fn needs_action(self) -> bool
Only an action outside synaps fixes it (a corrupt or missing store, a billing requirement); neither a retry nor a login does.
Trait Implementations§
Source§impl Clone for AccountFailureKind
impl Clone for AccountFailureKind
Source§fn clone(&self) -> AccountFailureKind
fn clone(&self) -> AccountFailureKind
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 AccountFailureKind
Source§impl Debug for AccountFailureKind
impl Debug for AccountFailureKind
Source§impl<'de> Deserialize<'de> for AccountFailureKind
impl<'de> Deserialize<'de> for AccountFailureKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AccountFailureKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AccountFailureKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for AccountFailureKind
impl Display for AccountFailureKind
impl Eq for AccountFailureKind
Source§impl Hash for AccountFailureKind
impl Hash for AccountFailureKind
Source§impl PartialEq for AccountFailureKind
impl PartialEq for AccountFailureKind
Source§impl Serialize for AccountFailureKind
impl Serialize for AccountFailureKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for AccountFailureKind
Auto Trait Implementations§
impl Freeze for AccountFailureKind
impl RefUnwindSafe for AccountFailureKind
impl Send for AccountFailureKind
impl Sync for AccountFailureKind
impl Unpin for AccountFailureKind
impl UnsafeUnpin for AccountFailureKind
impl UnwindSafe for AccountFailureKind
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<'a, T> Prefix<&'a [T], T> for T
impl<'a, T> Prefix<&'a [T], T> for T
Source§fn take_prefix(&self, haystack: &'a [T]) -> Option<(T, &'a [T])>
fn take_prefix(&self, haystack: &'a [T]) -> Option<(T, &'a [T])>
Source§fn skip_prefix(&self, haystack: Parent) -> Option<Parent>
fn skip_prefix(&self, haystack: Parent) -> Option<Parent>
impl<T> ThreadSafetyMarker for Twhere
T: Send,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more