http_type/cookie/type.rs
1use crate::*;
2
3/// Represents the raw cookie string from an HTTP request header.
4///
5/// Contains the complete cookie header value as received from the client.
6pub type CookieString = String;
7/// Represents the key/name of an HTTP cookie.
8///
9/// Used to identify individual cookies in requests and responses.
10pub type CookieKey = String;
11/// Represents the value/content of an HTTP cookie.
12///
13/// Stores the actual data associated with a cookie name/key.
14pub type CookieValue = String;
15/// Represents an optional cookie value.
16///
17/// Used when a cookie value may or may not be present.
18pub type OptionCookiesValue = Option<CookieValue>;
19/// Represents an optional cookie expiration date.
20///
21/// Stores the RFC 1123 formatted date string when present.
22pub type OptionCookieExpires = Option<String>;
23/// Represents an optional cookie maximum age in seconds.
24///
25/// Specifies the lifetime of the cookie in seconds when present.
26pub type OptionCookieMaxAge = Option<i64>;
27/// Represents an optional cookie domain scope.
28///
29/// Specifies which hosts can receive the cookie when present.
30pub type OptionCookieDomain = Option<String>;
31/// Represents an optional cookie path scope.
32///
33/// Specifies URL path that must exist in the requested URL when present.
34pub type OptionCookiePath = Option<String>;
35/// Represents an optional cookie SameSite policy.
36///
37/// Specifies if/how cookies should be restricted to first-party sites when present.
38/// Possible values: "Strict", "Lax", or "None".
39pub type OptionCookieSameSite = Option<String>;
40/// Represents a collection of HTTP cookies.
41///
42/// Stores multiple cookies as key-value pairs using a high-performance hash map.
43pub type Cookies = HashMapXxHash3_64<CookieKey, CookieValue>;