Skip to main content

Module session_backend

Module session_backend 

Source
Expand description

Pluggable session storage backend.

The SessionBackend trait abstracts over session persistence so that callers can swap in an SQLite store, a custom binary file, an in-memory store, or anything else.

Two built-in backends are provided:

  • BinaryFileBackend — the original binary file format (default).
  • [SqliteBackend] — SQLite (requires the sqlite-session Cargo feature).

Structs§

BinaryFileBackend
The default session backend — stores the session in a compact binary file.
InMemoryBackend
An ephemeral session backend that stores nothing on disk.

Traits§

SessionBackend
An abstraction over where and how session data is persisted.