Expand description
Everything you need to work with HTTP cookies.
§Guide
Check out the “Cookies” section of Pavex’s guide for a thorough introduction to cookies.
§Implementation details
Most types and functions are re-exports of the
biscotti@0.3
crate.
Modules§
- config
- Configuration for a
Processor
. - errors
- Errors that can occur when working with cookies.
- request
- Low-level types related to
RequestCookies
. - response
- Low-level types related to
ResponseCookies
.
Structs§
- Key
- A cryptographic master key to sign or encrypt cookies.
- Processor
- Transforms cookies before they are sent to the client, or after they have been parsed from an incoming request.
- Processor
Config Config
specifies how the server should handle incoming and outgoing cookies with respect to security and encoding.- Removal
Cookie - A
ResponseCookie
that, when sent to the client, removes a cookie with the sameResponseCookieId
from the client’s machine, if it exists. - Request
Cookie - A cookie set by a client in an HTTP request using the
Cookie
header. - Request
Cookies - A collection of
RequestCookie
s attached to an HTTP request using theCookie
header. - Response
Cookie - A cookie set by a server in an HTTP response using the
Set-Cookie
header. - Response
Cookie Id - A unique identifier for a
ResponseCookie
. - Response
Cookies - A collection of
ResponseCookie
s to be attached to an HTTP response using theSet-Cookie
header.
Enums§
- Expiration
- A cookie’s expiration: either a date-time or session.
- Same
Site - The
SameSite
cookie attribute.
Constants§
- CONFIG_
INTO_ PROCESSOR - A handle to add [
config_into_processor()
] as a constructor to your Pavex application. - INJECT_
RESPONSE_ COOKIES - A handle to add
inject_response_cookies()
as a post-processing middleware to your Pavex application. - PROCESSOR_
CONFIG - A strongly-typed id to register
ProcessorConfig
as a configuration type to your Pavex application.
Functions§
- extract_
request_ cookies - Parse cookies out of the incoming request.
- inject_
response_ cookies - Attach cookies to the outgoing response.