[][src]Trait actix_web::middleware::session::SessionImpl

pub trait SessionImpl: 'static {
    fn get(&self, key: &str) -> Option<&str>;
fn set(&mut self, key: &str, value: String);
fn remove(&mut self, key: &str);
fn clear(&mut self);
fn write(&self, resp: HttpResponse) -> Result<Response>; }

A simple key-value storage interface that is internally used by Session.

Required methods

fn get(&self, key: &str) -> Option<&str>

Get session value by key

fn set(&mut self, key: &str, value: String)

Set session value

fn remove(&mut self, key: &str)

Remove specific key from session

fn clear(&mut self)

Remove all values from session

fn write(&self, resp: HttpResponse) -> Result<Response>

Write session to storage backend.

Loading content...

Implementors

impl SessionImpl for CookieSession[src]

Loading content...