pub enum CacheResponse<R: Responder<'static>> {
Public {
responder: R,
max_age: u32,
must_revalidate: bool,
},
Private {
responder: R,
max_age: u32,
},
NoCache(R),
NoStore(R),
NoCacheControl(R),
}Expand description
The responder with a Cache-Control header.
Variants
Public
Private
NoCache(R)
NoStore(R)
NoCacheControl(R)
Implementations
sourceimpl<R: Responder<'static>> CacheResponse<R>
impl<R: Responder<'static>> CacheResponse<R>
sourcepub fn public_only_release(
responder: R,
_max_age: u32,
_must_revalidate: bool
) -> CacheResponse<R>
pub fn public_only_release(
responder: R,
_max_age: u32,
_must_revalidate: bool
) -> CacheResponse<R>
Use public cache only when this program is built on the release mode.
sourcepub fn private_only_release(responder: R, _max_age: u32) -> CacheResponse<R>
pub fn private_only_release(responder: R, _max_age: u32) -> CacheResponse<R>
Use private cache only when this program is built on the release mode.
Trait Implementations
sourceimpl<R: Debug + Responder<'static>> Debug for CacheResponse<R>
impl<R: Debug + Responder<'static>> Debug for CacheResponse<R>
sourceimpl<R: Responder<'static>> Responder<'static> for CacheResponse<R>
impl<R: Responder<'static>> Responder<'static> for CacheResponse<R>
sourcefn respond_to(self, req: &Request<'_>) -> Result<'static>
fn respond_to(self, req: &Request<'_>) -> Result<'static>
Returns
Ok if a Response could be generated successfully. Otherwise,
returns an Err with a failing Status. Read moreAuto Trait Implementations
impl<R> RefUnwindSafe for CacheResponse<R>where
R: RefUnwindSafe,
impl<R> Send for CacheResponse<R>where
R: Send,
impl<R> Sync for CacheResponse<R>where
R: Sync,
impl<R> Unpin for CacheResponse<R>where
R: Unpin,
impl<R> UnwindSafe for CacheResponse<R>where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
Converts
self into a collection.