[][src]Struct async_session::mem::MemoryStore

pub struct MemoryStore { /* fields omitted */ }

An in-memory session store.

Security

This store does not generate secure sessions, and should under no circumstance be used in production. It's meant only to quickly create sessions.

Methods

impl MemoryStore[src]

pub fn new() -> Self[src]

Create a new instance of MemoryStore.

pub fn create_session(&self) -> Session[src]

Generates a new session by generating a new uuid.

This is not a secure way of generating sessions, and is intended for debug purposes only.

Trait Implementations

impl Clone for MemoryStore[src]

impl Debug for MemoryStore[src]

impl SessionStore for MemoryStore[src]

type Error = Error

The type of error that can occur when storing and loading errors.

fn load_session<'life0, 'life1, 'async_trait>(
    &'life0 self,
    jar: &'life1 CookieJar
) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Get a session from the storage backend.

fn store_session<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    sess: Session,
    jar: &'life1 mut CookieJar
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Store a session on the storage backend.

The data inside the session will be url-encoded so it can be stored inside a cookie.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,