Trait actix_web::middleware::session::RequestSession [−][src]
The helper trait to obtain your session data from a request.
use actix_web::middleware::session::RequestSession; use actix_web::*; fn index(mut req: HttpRequest) -> Result<&'static str> { // access session data if let Some(count) = req.session().get::<i32>("counter")? { req.session().set("counter", count + 1)?; } else { req.session().set("counter", 1)?; } Ok("Welcome!") }
Required Methods
Implementors
impl<S> RequestSession for HttpRequest<S>