Enum http_cache_semantics::BeforeRequest[][src]

pub enum BeforeRequest {
    Fresh(Parts),
    Stale {
        request: Parts,
        matches: bool,
    },
}
Expand description

Next action suggested after before_request()

Variants

Fresh(Parts)

Tuple Fields

0: Parts

Good news! You can use it with body from the cache. No need to contact the server.

Stale

Fields

request: Parts

Send this request to the server (it has added revalidation headers when appropriate)

matches: bool

If false, request was for some other resource that isn’t semantically the same as previously cached request+response

You must send the request to the server first.

Implementations

For backwards compatibility only. Don’t forget to use request headers from BeforeRequest::Fresh

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.