pub struct CacheControl(/* private fields */);Expand description
Route middleware that sets a route’s Cache-Control for its successful GET responses, in
place of Config::cache_control, as cache-control: route middleware does in PHP:
route.get("/customers", index).middleware(fusion_stack::CacheControl::new("private, max-age=10"));Implementations§
Trait Implementations§
Source§impl Clone for CacheControl
impl Clone for CacheControl
Auto Trait Implementations§
impl Forget for CacheControl
impl Freeze for CacheControl
impl Move for CacheControl
impl RefUnwindSafe for CacheControl
impl Send for CacheControlwhere
RawVecInner: Send,
impl Sync for CacheControlwhere
RawVecInner: Sync,
impl Unpin for CacheControl
impl UnsafeUnpin for CacheControl
impl UnwindSafe for CacheControlwhere
RawVecInner: UnwindSafe,
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<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<M> IntoMiddleware for Mwhere
M: Middleware,
impl<M> IntoMiddleware for Mwhere
M: Middleware,
Source§fn into_group(self) -> MiddlewareGroup
fn into_group(self) -> MiddlewareGroup
Convert into a group.