pub struct SessionStore<T> {
    pub store: Box<dyn Store<Value = T>>,
    pub name: String,
    pub duration: Duration,
}
Expand description

Store that keeps tracks of sessions

Fields

store: Box<dyn Store<Value = T>>

The store that will keep track of sessions.

name: String

The name of the cookie to be used for sessions.

This will be the name the cookie will be stored under in the browser.

duration: Duration

The duration of the session.

When so much time passes after storing or touching a session, it expires and won’t be accesible.

Implementations

A function to turn the store into a Fairing to attach on a rocket.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Converts self into a collection.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more