Skip to main content

Module http_date

Module http_date 

Source
Expand description

The IMF-fixdate a registry gives for a retry. The HTTP date a registry gives for a retry.

crates.io names the time of its next new-crate slot as an IMF-fixdate. It appears in cargo’s “try again after” message and in a Retry-After header, which may also contain a count of seconds (RFC 9110 section 10.2.3). wait reads both. The parser handles only the fixed form RFC 9110 section 5.6.7 defines, such as Fri, 13 Nov 2026 15:10:00 GMT, so no date crate is needed.

Functions§

parse
The instant an IMF-fixdate names, or None when text is not one: the weekday must name the date, the month must be a month, and the zone must be GMT.
parse_prefix
The instant an IMF-fixdate at the start of text names, along with the matched 29-byte timestamp slice, or None when text does not begin with one.
wait
How long to wait for value: a count of seconds, or an IMF-fixdate. A date already past is no wait. None when value is neither.