Crate cookie[][src]

HTTP cookie parsing and cookie jar management.

This crates provides the Cookie type, which directly maps to an HTTP cookie, and the CookieJar type, which allows for simple management of many cookies as well as encryption and signing of cookies for session management.

Usage

Add the following to the [dependencies] section of your Cargo.toml:

This example is not tested
cookie = "0.10"

Then add the following line to your crate root:

This example is not tested
extern crate cookie;

Features

This crates can be configured at compile-time through the following Cargo features:

You can enable features via the Cargo.toml file:

This example is not tested
[dependencies.cookie]
features = ["secure", "percent-encode"]

Structs

Cookie

Representation of an HTTP cookie.

CookieBuilder

Structure that follows the builder pattern for building Cookie structs.

CookieJar

A collection of cookies that tracks its modifications.

Delta

Iterator over the changes to a cookie jar.

EncodedCookie

Wrapper around Cookie whose Display implementation percent-encodes the cookie's name and value.

Iter

Iterator over all of the cookies in a jar.

Key

A cryptographic master key for use with Signed and/or Private jars.

PrivateJar

A child cookie jar that provides authenticated encryption for its cookies.

SignedJar

A child cookie jar that authenticates its cookies.

Enums

ParseError

Enum corresponding to a parsing error.

SameSite

The SameSite cookie attribute.