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>
§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