Skip to main content

Module retry

Module retry 

Source

Structs§

RetryPolicy
Retry/backoff policy. max_attempts counts total tries (1 = no retry).

Functions§

parse_rate_limit_reset
parse_rate_limit_reset_at against the current clock.
parse_rate_limit_reset_at
Parse a rate-limit reset value (X-RateLimit-Reset and similar) into the wait it names, measured from now. Accepted forms: whole Unix epoch seconds (1760000000) and an ISO-8601 instant with T (or a space) and either Z or a ±HH:MM offset, fractional seconds allowed (2026-10-18T10:00:00Z). A reset already past is Duration::ZERO; any other text is None. A bare small integer is read as epoch seconds, so a delta-seconds value is not accepted here; use parse_retry_after_at for those.
parse_retry_after
Parse a Retry-After header: delta-seconds or an HTTP-date (RFC 9110 section 10.2.3). A date is turned into a delay from the current clock; a date in the past is zero.
parse_retry_after_at
parse_retry_after against an explicit now (for tests and callers with their own clock).