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)
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.