Struct tower_sessions::service::SessionManager
source ยท pub struct SessionManager<S, Store: SessionStore, C: CookieController = PlaintextCookie> { /* private fields */ }Expand description
A middleware that provides Session as a request extension.
Implementationsยง
sourceยงimpl<S, Store: SessionStore> SessionManager<S, Store>
impl<S, Store: SessionStore> SessionManager<S, Store>
sourcepub fn new(inner: S, session_store: Store) -> Self
pub fn new(inner: S, session_store: Store) -> Self
Create a new SessionManager.
Trait Implementationsยง
sourceยงimpl<S: Clone, Store: Clone + SessionStore, C: Clone + CookieController> Clone for SessionManager<S, Store, C>
impl<S: Clone, Store: Clone + SessionStore, C: Clone + CookieController> Clone for SessionManager<S, Store, C>
sourceยงfn clone(&self) -> SessionManager<S, Store, C>
fn clone(&self) -> SessionManager<S, Store, C>
Returns a copy of the value. Read more
1.0.0 ยท sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceยงimpl<S: Debug, Store: Debug + SessionStore, C: Debug + CookieController> Debug for SessionManager<S, Store, C>
impl<S: Debug, Store: Debug + SessionStore, C: Debug + CookieController> Debug for SessionManager<S, Store, C>
sourceยงimpl<ReqBody, ResBody, S, Store: SessionStore, C: CookieController> Service<Request<ReqBody>> for SessionManager<S, Store, C>
impl<ReqBody, ResBody, S, Store: SessionStore, C: CookieController> Service<Request<ReqBody>> for SessionManager<S, Store, C>
sourceยงtype Future = Pin<Box<dyn Future<Output = Result<<SessionManager<S, Store, C> as Service<Request<ReqBody>>>::Response, <SessionManager<S, Store, C> as Service<Request<ReqBody>>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<SessionManager<S, Store, C> as Service<Request<ReqBody>>>::Response, <SessionManager<S, Store, C> as Service<Request<ReqBody>>>::Error>> + Send>>
The future response value.
Auto Trait Implementationsยง
impl<S, Store, C> Freeze for SessionManager<S, Store, C>
impl<S, Store, C> RefUnwindSafe for SessionManager<S, Store, C>
impl<S, Store, C> Send for SessionManager<S, Store, C>where
S: Send,
impl<S, Store, C> Sync for SessionManager<S, Store, C>
impl<S, Store, C> Unpin for SessionManager<S, Store, C>
impl<S, Store, C> UnwindSafe for SessionManager<S, Store, C>
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
sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
sourceยงunsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
๐ฌThis is a nightly-only experimental API. (
clone_to_uninit)