pub struct SetCookieParams {Show 13 fields
pub name: String,
pub value: String,
pub url: Option<String>,
pub domain: Option<String>,
pub path: Option<String>,
pub secure: Option<bool>,
pub httpOnly: Option<bool>,
pub sameSite: Option<CookieSameSite>,
pub expires: Option<TimeSinceEpoch>,
pub priority: Option<CookiePriority>,
pub sourceScheme: Option<CookieSourceScheme>,
pub sourcePort: Option<i64>,
pub partitionKey: Option<CookiePartitionKey>,
}Expand description
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
Fields§
§name: StringCookie name.
value: StringCookie value.
url: Option<String>The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
domain: Option<String>Cookie domain.
path: Option<String>Cookie path.
secure: Option<bool>True if cookie is secure.
httpOnly: Option<bool>True if cookie is http-only.
sameSite: Option<CookieSameSite>Cookie SameSite type.
expires: Option<TimeSinceEpoch>Cookie expiration date, session cookie if not set
priority: Option<CookiePriority>Cookie Priority type.
sourceScheme: Option<CookieSourceScheme>Cookie source scheme type.
sourcePort: Option<i64>Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
partitionKey: Option<CookiePartitionKey>Cookie partition key. If not set, the cookie will be set as not partitioned.
Trait Implementations§
Source§impl Clone for SetCookieParams
impl Clone for SetCookieParams
Source§fn clone(&self) -> SetCookieParams
fn clone(&self) -> SetCookieParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more