Crate cookie_store

Source
Expand description

Provides an implementation for storing and retrieving Cookies per the path and domain matching rules specified in RFC6265.

§Example

Please refer to the reqwest_cookie_store for an example of using this library along with reqwest.

§Feature flags

  • preserve_order — uses indexmap::IndexMap in lieu of HashMap internally, so cookies are maintained in insertion/creation order
  • public_suffix (enabled by default) — Add support for public suffix lists, as provided by publicsuffix.
  • wasm-bindgen — Enables transitive feature time/wasm-bindgen; necessary in wasm contexts.
  • log_secure_cookie_values — Enable logging the values of cookies marked ‘secure’, off by default as values may be sensitive

§Serialization

  • serde — Supports generic (format-agnostic) de/serialization for a CookieStore. Adds dependencies serde and serde_derive.
  • serde_json (enabled by default) — Supports de/serialization for a CookieStore via the JSON format. Enables feature serde and adds depenency serde_json.
  • serde_ron — Supports de/serialization for a CookieStore via the RON format. Enables feature serde and adds depenency ron.

Modules§

serde
De/serialization functionality Requires feature serde

Structs§

Cookie
A cookie conforming more closely to IETF RFC6265
CookiePath
The path of a Cookie
CookieStore
An implementation for storing and retrieving Cookies per the path and domain matching rules specified in RFC6265.
IdnaErrors
RawCookie
Representation of an HTTP cookie.

Enums§

CookieDomain
The domain of a Cookie
CookieError
CookieExpiration
When a given Cookie expires
RawCookieParseError
Enum corresponding to a parsing error.
StoreAction

Type Aliases§

CookieResult
Error
Result