http_type/cookie/
struct.rs

1use crate::*;
2
3/// A builder for constructing HTTP cookies with various attributes.
4#[derive(Debug, Clone, Default)]
5pub struct CookieBuilder {
6    /// The name of the cookie.
7    pub(super) name: CookieKey,
8    /// The value of the cookie.
9    pub(super) value: CookieValue,
10    /// Optional expiration date string (e.g., "Wed, 21 Oct 2015 07:28:00 GMT").
11    pub(super) expires: OptionCookieExpires,
12    /// Optional maximum age in seconds.
13    pub(super) max_age: OptionCookieMaxAge,
14    /// Optional domain for the cookie.
15    pub(super) domain: OptionCookieDomain,
16    /// Optional path for the cookie.
17    pub(super) path: OptionCookiePath,
18    /// Whether the cookie should only be sent over HTTPS.
19    pub(super) secure: bool,
20    /// Whether the cookie should be inaccessible to JavaScript.
21    pub(super) http_only: bool,
22    /// Optional SameSite policy ("Strict", "Lax", or "None").
23    pub(super) same_site: OptionCookieSameSite,
24}