Skip to main content

SessionExt

Trait SessionExt 

Source
pub trait SessionExt {
    // Required methods
    fn try_session(&self) -> Option<&SessionHandle>;
    fn session(&self) -> &SessionHandle;
}
Expand description

req.session() — reaching the session from a handler.

Required Methods§

Source

fn try_session(&self) -> Option<&SessionHandle>

The session, or None when the session middleware is not installed.

Source

fn session(&self) -> &SessionHandle

The session, panicking with an actionable message if it is absent.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SessionExt for Request

Implementors§