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
Public
Private
NoCache(R)
NoStore(R)
NoCacheControl(R)
Implementations
sourceimpl<'r, 'o: 'r, R: Responder<'r, 'o>> CacheResponsePro<'r, 'o, R>
impl<'r, 'o: 'r, R: Responder<'r, 'o>> CacheResponsePro<'r, 'o, R>
sourcepub 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.
sourcepub fn private_only_release(
responder: R,
_max_age: u32
) -> CacheResponsePro<'r, 'o, R>
pub fn private_only_release(
responder: R,
_max_age: u32
) -> CacheResponsePro<'r, 'o, R>
Use private cache only when this program is built on the release mode.
Trait Implementations
sourceimpl<'r, 'o: 'r, R: Debug + Responder<'r, 'o>> Debug for CacheResponsePro<'r, 'o, R>
impl<'r, 'o: 'r, R: Debug + Responder<'r, 'o>> Debug for CacheResponsePro<'r, 'o, R>
sourceimpl<'r, 'o: 'r, R: Responder<'r, 'o>> Responder<'r, 'o> for CacheResponsePro<'r, 'o, R>
impl<'r, 'o: 'r, R: Responder<'r, 'o>> Responder<'r, 'o> for CacheResponsePro<'r, 'o, R>
sourcefn respond_to(self, req: &'r Request<'_>) -> Result<'o>
fn respond_to(self, req: &'r Request<'_>) -> Result<'o>
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: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
F: FnMut(T) -> U,
A: Array<Item = U>,
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more