Expand description
Session bag, stores, flash messages, and middleware.
Structs§
- Async
Session Middleware - Async
AsyncMiddlewarevariant forserenade_http::AsyncHttpKernel. - Cookie
Session - Opens and commits sessions using a store plus a session-id cookie.
- Cookie
Session Options - Options for the session id cookie written on commit.
- Flash
Bag - One-shot messages keyed by type (
success,error, …). - Memory
Session Store - Process-local session store (tests and single-node dev).
- Session
- Mutable key/value session attributes for one request lifecycle.
- Session
Middleware - Loads a session before the handler and commits it afterward (sync kernel).
Enums§
- Same
Site SameSiteattribute for the session cookie.- Session
Error - Failure while reading or writing session state.
Constants§
- DEFAULT_
SESSION_ COOKIE - Default session cookie name.
- FLASH_
SESSION_ KEY - Session attribute key for serialized flash messages.
- SESSION_
ATTRIBUTE - Request attribute key where the session middleware stores the
Session.
Traits§
- Session
Store - Loads and saves session attribute maps by id.
Functions§
- generate_
session_ id - Generates a new opaque session id (32 random bytes, hex-encoded).
- parse_
cookie_ value - Reads
namefrom a rawCookieheader (a=1; b=2). - request_
session - Returns the session from request attributes when present.
- request_
session_ mut - Returns a mutable session from request attributes when present.