[][src]Struct gotham::middleware::session::MemoryBackend

pub struct MemoryBackend { /* fields omitted */ }

Defines the in-process memory based session storage.

This is the default implementation which is used by NewSessionMiddleware::default()

Methods

impl MemoryBackend[src]

pub fn new(ttl: Duration) -> MemoryBackend[src]

Creates a new MemoryBackend where sessions expire and are removed after the ttl has elapsed.

Alternately, MemoryBackend::default() creates a MemoryBackend with a ttl of one hour.

Examples

NewSessionMiddleware::new(MemoryBackend::new(Duration::from_secs(3600)))

Trait Implementations

impl NewBackend for MemoryBackend[src]

type Instance = MemoryBackend

The type of Backend created by the NewBackend.

impl Backend for MemoryBackend[src]

impl Clone for MemoryBackend[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for MemoryBackend[src]

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T