Enum trillium_http_types::cache::CacheDirective [−][src]
#[non_exhaustive]
pub enum CacheDirective {
}Expand description
An HTTP Cache-Control directive.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
The response body will not change over time.
MaxAge(Duration)The maximum amount of time a resource is considered fresh.
Indicates the client will accept a stale response.
MinFresh(Duration)A response that will still be fresh for at least the specified duration.
Once a response is stale, a fresh response must be retrieved.
The response may be cached, but must always be revalidated before being used.
The response may not be cached.
An intermediate cache or proxy should not edit the response body, Content-Encoding, Content-Range, or Content-Type.
Do not use the network for a response.
The response may be stored only by a browser’s cache, even if the response is normally non-cacheable.
Like must-revalidate, but only for shared caches (e.g., proxies).
The response may be stored by any cache, even if the response is normally non-cacheable.
SMaxAge(Duration)Overrides max-age or the Expires header, but only for shared caches.
StaleIfError(Duration)The client will accept a stale response if retrieving a fresh one fails.
StaleWhileRevalidate(Duration)Indicates the client will accept a stale response, while asynchronously checking in the background for a fresh one.
Implementations
Check whether this directive is valid in an HTTP request.
Check whether this directive is valid in an HTTP response.
Trait Implementations
Performs the conversion.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for CacheDirectiveimpl Send for CacheDirectiveimpl Sync for CacheDirectiveimpl Unpin for CacheDirectiveimpl UnwindSafe for CacheDirectiveBlanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V