pub struct SetCookieParams<'a> { /* private fields */ }Expand description
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
Implementations§
Source§impl<'a> SetCookieParams<'a>
impl<'a> SetCookieParams<'a>
Sourcepub fn builder(
name: impl Into<Cow<'a, str>>,
value: impl Into<Cow<'a, str>>,
) -> SetCookieParamsBuilder<'a>
pub fn builder( name: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>, ) -> SetCookieParamsBuilder<'a>
Creates a builder for this type with the required parameters:
name: Cookie name.value: Cookie value.
Sourcepub fn url(&self) -> Option<&str>
pub fn url(&self) -> Option<&str>
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.
Sourcepub fn same_site(&self) -> Option<&CookieSameSite>
pub fn same_site(&self) -> Option<&CookieSameSite>
Cookie SameSite type.
Sourcepub fn expires(&self) -> Option<&TimeSinceEpoch>
pub fn expires(&self) -> Option<&TimeSinceEpoch>
Cookie expiration date, session cookie if not set
Sourcepub fn priority(&self) -> Option<&CookiePriority>
pub fn priority(&self) -> Option<&CookiePriority>
Cookie Priority type.
Sourcepub fn source_scheme(&self) -> Option<&CookieSourceScheme>
pub fn source_scheme(&self) -> Option<&CookieSourceScheme>
Cookie source scheme type.
Sourcepub fn source_port(&self) -> Option<i64>
pub fn source_port(&self) -> 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.
Sourcepub fn partition_key(&self) -> Option<&CookiePartitionKey<'a>>
pub fn partition_key(&self) -> Option<&CookiePartitionKey<'a>>
Cookie partition key. If not set, the cookie will be set as not partitioned.
Trait Implementations§
Source§impl<'a> CdpCommand<'a> for SetCookieParams<'a>
impl<'a> CdpCommand<'a> for SetCookieParams<'a>
Source§impl<'a> Clone for SetCookieParams<'a>
impl<'a> Clone for SetCookieParams<'a>
Source§fn clone(&self) -> SetCookieParams<'a>
fn clone(&self) -> SetCookieParams<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more