pub enum Disposition {
Success,
AuthDead,
RateLimited {
retry_after: Option<Duration>,
},
Transient,
Permanent,
}Expand description
5-state classification driving failover + cooldown + credential health +
billing (§6.4). Same shape as v1’s ResponseClassification.
Variants§
Success
2xx — return; mark credential healthy; bill (§17).
AuthDead
401/402/403 — refresh once; still dead → mark dead, next credential.
RateLimited
429 — with retry_after: cool this credential + switch; else limited
same-credential retries.
Transient
5xx / network — next credential.
Permanent
4xx validation — return immediately, no retry.
Implementations§
Source§impl Disposition
impl Disposition
pub fn is_success(&self) -> bool
Sourcepub fn should_failover(&self) -> bool
pub fn should_failover(&self) -> bool
Whether failover should advance to the next candidate.
Sourcepub fn from_http(status: StatusCode, headers: &HeaderMap) -> Self
pub fn from_http(status: StatusCode, headers: &HeaderMap) -> Self
Generic HTTP-status → disposition mapping shared by all channels (the
Channel::classify default). Channels override only if they need
provider-specific signals (e.g. a 200 body carrying an error envelope).
Trait Implementations§
Source§impl Clone for Disposition
impl Clone for Disposition
Source§fn clone(&self) -> Disposition
fn clone(&self) -> Disposition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Disposition
impl Debug for Disposition
impl Eq for Disposition
Source§impl PartialEq for Disposition
impl PartialEq for Disposition
impl StructuralPartialEq for Disposition
Auto Trait Implementations§
impl Freeze for Disposition
impl RefUnwindSafe for Disposition
impl Send for Disposition
impl Sync for Disposition
impl Unpin for Disposition
impl UnsafeUnpin for Disposition
impl UnwindSafe for Disposition
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
Mutably borrows from an owned value. Read more