pub struct SessionLayer { /* private fields */ }Expand description
Session middleware
Implementations§
Source§impl SessionLayer
impl SessionLayer
pub fn with_store(store: impl SessionStore) -> Self
Cookie name (default __Host-sid, only valid together with Secure)
For plain-HTTP development: no Secure flag and the cookie name sid
(the __Host- prefix is rejected by browsers without Secure)
Sourcepub fn idle_timeout(self, secs: u64) -> Self
pub fn idle_timeout(self, secs: u64) -> Self
A session ends after this many seconds without a request
Sourcepub fn absolute_timeout(self, secs: u64) -> Self
pub fn absolute_timeout(self, secs: u64) -> Self
A session ends this many seconds after it was created, however active
Trait Implementations§
Source§impl Default for SessionLayer
impl Default for SessionLayer
Auto Trait Implementations§
impl !RefUnwindSafe for SessionLayer
impl !UnwindSafe for SessionLayer
impl Freeze for SessionLayer
impl Send for SessionLayer
impl Sync for SessionLayer
impl Unpin for SessionLayer
impl UnsafeUnpin for SessionLayer
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