Struct salvo_extra::session::SessionHandler [−][src]
pub struct SessionHandler<S> { /* fields omitted */ }
Expand description
SessionHandler
Implementations
Sets a cookie path for this session middleware. The default for this value is “/”
Sets a session ttl. This will be used both for the cookie expiry and also for the session-internal expiry.
The default for this value is one day. Set this to None to not set a cookie or session expiry. This is not recommended.
Sets the name of the cookie that the session is stored with or in.
If you are running multiple tide applications on the same domain, you will need different values for each application. The default value is “tide.sid”
Disables the save_unchanged
setting. When save_unchanged
is enabled, a session will cookie will always be set. With
save_unchanged
disabled, the session data must be modified
from the Default
value in order for it to save. If a session
already exists and its data unmodified in the course of a
request, the session will only be persisted if
save_unchanged
is enabled.
Sets the same site policy for the session cookie. Defaults to SameSite::Lax. See incrementally better cookies for more information about this setting
Sets the domain of the cookie.
Trait Implementations
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Handle http request.
Auto Trait Implementations
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
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more