Enum rocket_cache_response::CacheResponsePro [−][src]
pub enum CacheResponsePro<'r, 'o: 'r, R: Responder<'r, 'o>> { Public { responder: R, max_age: u32, must_revalidate: bool, }, Private { responder: R, max_age: u32, }, NoCache(R), NoStore(R), NoCacheControl(R), // some variants omitted }
Expand description
The responder with a Cache-Control
header.
Variants
Fields of Private
responder: R
max_age: u32
Implementations
pub fn public_only_release(
responder: R,
_max_age: u32,
_must_revalidate: bool
) -> CacheResponsePro<'r, 'o, R>
pub fn public_only_release(
responder: R,
_max_age: u32,
_must_revalidate: bool
) -> CacheResponsePro<'r, 'o, R>
Use public cache only when this program is built on the release mode.
Use private cache only when this program is built on the release mode.
Trait Implementations
Returns Ok
if a Response
could be generated successfully. Otherwise,
returns an Err
with a failing Status
. Read more
Auto Trait Implementations
impl<'r, 'o, R> RefUnwindSafe for CacheResponsePro<'r, 'o, R> where
R: RefUnwindSafe,
impl<'r, 'o, R> Send for CacheResponsePro<'r, 'o, R> where
R: Send + Sync,
impl<'r, 'o, R> Sync for CacheResponsePro<'r, 'o, R> where
R: Sync,
impl<'r, 'o, R> Unpin for CacheResponsePro<'r, 'o, R> where
R: Unpin,
impl<'r, 'o, R> UnwindSafe for CacheResponsePro<'r, 'o, R> where
R: RefUnwindSafe + UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self
into a collection.