pub struct CookieSessionMiddleware<S> { /* private fields */ }Expand description
Cookie session middleware service, created by CookieSession.
Trait Implementations§
Source§impl<S, St: State, In> Service<St, WebRequest<In>> for CookieSessionMiddleware<S>where
S: Service<St, WebRequest<In>, Res = WebResponse>,
S::Error: 'static,
CookieSessionError: WebResponseError<St, St::Error>,
impl<S, St: State, In> Service<St, WebRequest<In>> for CookieSessionMiddleware<S>where
S: Service<St, WebRequest<In>, Res = WebResponse>,
S::Error: 'static,
CookieSessionError: WebResponseError<St, St::Error>,
Source§async fn call(
&self,
req: WebRequest<In>,
ctx: Ctx<'_, Self, St>,
) -> Result<Self::Res, Self::Error>
async fn call( &self, req: WebRequest<In>, ctx: Ctx<'_, Self, St>, ) -> Result<Self::Res, Self::Error>
Loads session state, calls the inner service, and persists or removes
the session cookie according to SessionStatus.
§Errors
Propagates inner service errors without writing cookies. Cookie size and serialization errors are rendered as error responses instead.
§Panics
Panics if the configured expiration is outside the supported date range.
Source§type Res = WebResponse
type Res = WebResponse
Response produced by the service.
Source§type Error = <S as Service<St, WebRequest<In>>>::Error
type Error = <S as Service<St, WebRequest<In>>>::Error
Error produced while checking readiness or processing a request.
Source§async fn ready(&self, ctx: Ctx<'_, Self, St>) -> Result<(), Self::Error>
async fn ready(&self, ctx: Ctx<'_, Self, St>) -> Result<(), Self::Error>
Waits until the service is ready to process a request. Read more
Source§fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
Maps this service’s output to a different type, returning a new service. Read more
Source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
Maps this service’s error to a different type, returning a new service. Read more
Auto Trait Implementations§
impl<S> !Send for CookieSessionMiddleware<S>
impl<S> !Sync for CookieSessionMiddleware<S>
impl<S> Forget for CookieSessionMiddleware<S>
impl<S> Freeze for CookieSessionMiddleware<S>where
S: Freeze,
impl<S> RefUnwindSafe for CookieSessionMiddleware<S>where
S: RefUnwindSafe,
impl<S> Unpin for CookieSessionMiddleware<S>where
S: Unpin,
impl<S> UnsafeUnpin for CookieSessionMiddleware<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for CookieSessionMiddleware<S>where
S: 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<S, St, Req> IntoService<S, St, Req> for Swhere
S: Service<St, Req>,
impl<S, St, Req> IntoService<S, St, Req> for Swhere
S: Service<St, Req>,
Source§fn into_service(self) -> S
fn into_service(self) -> S
Converts this value into a service.