pub enum CacheDirective {
}Expand description
Individual cache directive from Cache-Control header.
Variants§
Public
Response may be cached by any cache
Private
Response is for a single user and must not be stored by shared caches
NoStore
Response must not be stored in any cache
NoCache
Response can be stored but must be validated before use
MaxAge(u64)
Maximum time the response is fresh (in seconds)
SMaxAge(u64)
Maximum time a shared cache may store the response (in seconds)
MustRevalidate
Response must be revalidated after becoming stale
ProxyRevalidate
Shared caches must revalidate after becoming stale
NoTransform
Response must not be transformed (e.g., compressed)
Immutable
Response is immutable and won’t change
MaxStale(Option<u64>)
Client will accept stale response up to N seconds
MinFresh(u64)
Client wants response fresh for at least N seconds
OnlyIfCached
Client will only accept cached response
Extension(String, Option<String>)
Custom/unknown directive
Implementations§
Trait Implementations§
Source§impl Clone for CacheDirective
impl Clone for CacheDirective
Source§fn clone(&self) -> CacheDirective
fn clone(&self) -> CacheDirective
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CacheDirective
impl Debug for CacheDirective
Source§impl PartialEq for CacheDirective
impl PartialEq for CacheDirective
impl StructuralPartialEq for CacheDirective
Auto Trait Implementations§
impl Freeze for CacheDirective
impl RefUnwindSafe for CacheDirective
impl Send for CacheDirective
impl Sync for CacheDirective
impl Unpin for CacheDirective
impl UnsafeUnpin for CacheDirective
impl UnwindSafe for CacheDirective
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<R, D> DepsPresent<D> for R
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging