Skip to main content

Module cache

Module cache 

Source
Expand description

ETag and conditional response helpers.

Provides an IfNoneMatch extractor for the If-None-Match request header, a conditional helper that returns 304 when the ETag matches, and a with_etag helper to attach an ETag header to a response.

Structs§

IfNoneMatch
Extractor for the If-None-Match request header.

Functions§

conditional
Returns Some(304 Not Modified) if etag matches the client’s If-None-Match value. Returns None otherwise, signalling the caller should send the full response.
with_etag
Attaches an ETag header to a response.