pub struct SessionHandler<S> { /* private fields */ }Expand description
SessionHandler is a middleware for session.
Implementations§
Source§impl<S> SessionHandler<S>where
S: SessionStore,
impl<S> SessionHandler<S>where
S: SessionStore,
Sourcepub fn builder(store: S, secret: &[u8]) -> HandlerBuilder<S>
pub fn builder(store: S, secret: &[u8]) -> HandlerBuilder<S>
Create new HandlerBuilder
Trait Implementations§
Source§impl<S: SessionStore> Debug for SessionHandler<S>
impl<S: SessionStore> Debug for SessionHandler<S>
Source§impl<S> Handler for SessionHandler<S>where
S: SessionStore,
impl<S> Handler for SessionHandler<S>where
S: SessionStore,
Source§fn handle<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
depot: &'life2 mut Depot,
res: &'life3 mut Response,
ctrl: &'life4 mut FlowCtrl,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn handle<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
depot: &'life2 mut Depot,
res: &'life3 mut Response,
ctrl: &'life4 mut FlowCtrl,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Handle http request.
Source§fn arc(self) -> ArcHandlerwhere
Self: Sized,
fn arc(self) -> ArcHandlerwhere
Self: Sized,
Wrap to
ArcHandler.Source§fn hoop<H>(self, hoop: H) -> HoopedHandler
fn hoop<H>(self, hoop: H) -> HoopedHandler
Hoop this handler with middleware.
Auto Trait Implementations§
impl<S> Freeze for SessionHandler<S>where
S: Freeze,
impl<S> RefUnwindSafe for SessionHandler<S>where
S: RefUnwindSafe,
impl<S> Send for SessionHandler<S>where
S: Send,
impl<S> Sync for SessionHandler<S>where
S: Sync,
impl<S> Unpin for SessionHandler<S>where
S: Unpin,
impl<S> UnwindSafe for SessionHandler<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