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
[email protected] 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 Configspecifies how the server should handle incoming and outgoing cookies with respect to security and encoding.- Removal
Cookie - A
ResponseCookiethat, when sent to the client, removes a cookie with the sameResponseCookieIdfrom the client’s machine, if it exists. - Request
Cookie - A cookie set by a client in an HTTP request using the
Cookieheader. - Request
Cookies - A collection of
RequestCookies attached to an HTTP request using theCookieheader. - Response
Cookie - A cookie set by a server in an HTTP response using the
Set-Cookieheader. - Response
Cookie Id - A unique identifier for a
ResponseCookie. - Response
Cookies - A collection of
ResponseCookies to be attached to an HTTP response using theSet-Cookieheader.
Enums§
- Expiration
- A cookie’s expiration: either a date-time or session.
- Same
Site - The
SameSitecookie 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
ProcessorConfigas 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.