Struct tower_sessions::SessionManager
source · pub struct SessionManager<S, Store: SessionStore> { /* 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, cookie_config: CookieConfig) -> Self
pub fn new(inner: S, session_store: Store, cookie_config: CookieConfig) -> Self
Create a new SessionManager.
Trait Implementations§
source§impl<S: Clone, Store: Clone + SessionStore> Clone for SessionManager<S, Store>
impl<S: Clone, Store: Clone + SessionStore> Clone for SessionManager<S, Store>
source§fn clone(&self) -> SessionManager<S, Store>
fn clone(&self) -> SessionManager<S, Store>
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> Debug for SessionManager<S, Store>
impl<S: Debug, Store: Debug + SessionStore> Debug for SessionManager<S, Store>
source§impl<ReqBody, ResBody, S, Store: SessionStore> Service<Request<ReqBody>> for SessionManager<S, Store>where
S: Service<Request<ReqBody>, Response = Response<ResBody>> + Clone + Send + 'static,
S::Error: Into<Box<dyn Error + Send + Sync>> + 'static,
S::Future: Send,
ReqBody: Send + 'static,
ResBody: Send,
impl<ReqBody, ResBody, S, Store: SessionStore> Service<Request<ReqBody>> for SessionManager<S, Store>where S: Service<Request<ReqBody>, Response = Response<ResBody>> + Clone + Send + 'static, S::Error: Into<Box<dyn Error + Send + Sync>> + 'static, S::Future: Send, ReqBody: Send + 'static, ResBody: Send,
§type Future = Pin<Box<dyn Future<Output = Result<<SessionManager<S, Store> as Service<Request<ReqBody>>>::Response, <SessionManager<S, Store> as Service<Request<ReqBody>>>::Error>> + Send, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<SessionManager<S, Store> as Service<Request<ReqBody>>>::Response, <SessionManager<S, Store> as Service<Request<ReqBody>>>::Error>> + Send, Global>>
The future response value.
Auto Trait Implementations§
impl<S, Store> RefUnwindSafe for SessionManager<S, Store>where S: RefUnwindSafe, Store: RefUnwindSafe,
impl<S, Store> Send for SessionManager<S, Store>where S: Send,
impl<S, Store> Sync for SessionManager<S, Store>where S: Sync,
impl<S, Store> Unpin for SessionManager<S, Store>where S: Unpin, Store: Unpin,
impl<S, Store> UnwindSafe for SessionManager<S, Store>where S: UnwindSafe, Store: 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