pub trait RouterBuilderSessionExt {
// Required method
fn sessions(self, config: SessionConfig) -> Self;
}Available on crate feature
router only.Expand description
Installs session support on a RouterBuilder.
Required Methods§
Sourcefn sessions(self, config: SessionConfig) -> Self
fn sessions(self, config: SessionConfig) -> Self
Registers the session config on the app context, the root session
layer, and the OriginLayer rejecting state-changing cross-origin
requests (unless disabled with
SessionConfigBuilder::dangerous_disable_origin_verification).
The default cookie token store also needs the cookie layer, registered
with the cookie crate’s cookies extension method.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".