pub enum RetryAfterRule {
Unbounded,
StopAbove(Duration),
}Expand description
How a server-directed wait (Retry-After-Ms, Retry-After) is honoured.
Variants§
Unbounded
Anthropic SDK rule: any parsed wait is honoured (a negative or NaN one is zero, +Inf
saturates); an unparsable value falls through to the next header, then to backoff.
StopAbove(Duration)
OpenAI SDK rule: a wait above the limit, or a numeric overflow (1e400), stops retrying
and the response is returned; NaN, ±Inf and negative numbers are skipped (the next
header is tried); a past RFC 1123 date waits zero. StopAbove(Duration::ZERO) means
DEFAULT_MAX_RETRY_AFTER.
Trait Implementations§
Source§impl Clone for RetryAfterRule
impl Clone for RetryAfterRule
impl Copy for RetryAfterRule
Source§impl Debug for RetryAfterRule
impl Debug for RetryAfterRule
impl Eq for RetryAfterRule
Source§impl PartialEq for RetryAfterRule
impl PartialEq for RetryAfterRule
impl StructuralPartialEq for RetryAfterRule
Auto Trait Implementations§
impl Forget for RetryAfterRule
impl Freeze for RetryAfterRule
impl Move for RetryAfterRule
impl RefUnwindSafe for RetryAfterRule
impl Send for RetryAfterRule
impl Sync for RetryAfterRule
impl Unpin for RetryAfterRule
impl UnsafeUnpin for RetryAfterRule
impl UnwindSafe for RetryAfterRule
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
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
Compare self to
key and return true if they are equal.