[−][src]Enum surf::http::cache::CacheDirective
An HTTP Cache-Control
directive.
Variants (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
impl CacheDirective
[src]
pub fn valid_in_req(&self) -> bool
[src]
Check whether this directive is valid in an HTTP request.
pub fn valid_in_res(&self) -> bool
[src]
Check whether this directive is valid in an HTTP response.
Trait Implementations
impl Clone for CacheDirective
[src]
pub fn clone(&self) -> CacheDirective
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CacheDirective
[src]
impl Eq for CacheDirective
[src]
impl From<CacheDirective> for HeaderValue
[src]
pub fn from(directive: CacheDirective) -> HeaderValue
[src]
impl PartialEq<CacheDirective> for CacheDirective
[src]
pub fn eq(&self, other: &CacheDirective) -> bool
[src]
pub fn ne(&self, other: &CacheDirective) -> bool
[src]
impl StructuralEq for CacheDirective
[src]
impl StructuralPartialEq for CacheDirective
[src]
Auto Trait Implementations
impl RefUnwindSafe for CacheDirective
impl Send for CacheDirective
impl Sync for CacheDirective
impl Unpin for CacheDirective
impl UnwindSafe for CacheDirective
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,