Struct sessions_core::Config[][src]

pub struct Config<S: Storage> {
    pub cookie: CookieOptions,
    pub storage: S,
    pub generate: Box<dyn Send + Sync + Fn() -> String + 'static>,
    pub verify: Box<dyn Send + Sync + Fn(&str) -> bool + 'static>,
}
Expand description

Sessions Config

Fields

cookie: CookieOptions

Cookie Options

storage: S

Current Storage

generate: Box<dyn Send + Sync + Fn() -> String + 'static>

Generates session id

verify: Box<dyn Send + Sync + Fn(&str) -> bool + 'static>

Verifes session id

Implementations

Gets current storage

Gets cookie options

Gets cookie’s max_age or session’s expries

Generates a session id

Verifes a session id

Trait Implementations

Formats the value using the given formatter. Read more

Get a data from storage by the key

Set a data to storage by the key

Remove a data from storage by the key

Reset the storage and remove all keys

Close the connection

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.

Performs the conversion.

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.