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§
Sourcefn try_session(&self) -> Option<&SessionHandle>
fn try_session(&self) -> Option<&SessionHandle>
The session, or None when the session middleware is not installed.
Sourcefn session(&self) -> &SessionHandle
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".