# SessionExt in actix_session - Rust
Extract a [`Session`] object from various `actix-web` types (e.g. `HttpRequest`, `ServiceRequest`, `ServiceResponse`).
Keywords: rust, rustlang, rust-lang, SessionExt

# Trait actix_session::SessionExt

source · [−]

    pub trait SessionExt {
        fn get_session(&self) -> Session;
    }

Expand description

Extract a `Session` object from various `actix-web` types (e.g. `HttpRequest`, `ServiceRequest`, `ServiceResponse`).

## Required methods

source

#### fn get_session(&self) -> Session

Extract a `Session` object.

## Implementations on Foreign Types

source

### impl SessionExt for HttpRequest

source

#### fn get_session(&self) -> Session

source

### impl SessionExt for ServiceRequest

source

#### fn get_session(&self) -> Session

source

### impl SessionExt for ServiceResponse

source

#### fn get_session(&self) -> Session

source

### impl<'a> SessionExt for GuardContext<'a>

source

#### fn get_session(&self) -> Session

## Implementors