pub struct SetCookieParams {Show 14 fields
pub name: String,
pub value: String,
pub url: Option<String>,
pub domain: Option<String>,
pub path: Option<String>,
pub secure: Option<bool>,
pub http_only: Option<bool>,
pub same_site: Option<CookieSameSite>,
pub expires: Option<TimeSinceEpoch>,
pub priority: Option<CookiePriority>,
pub same_party: Option<bool>,
pub source_scheme: Option<CookieSourceScheme>,
pub source_port: Option<i64>,
pub partition_key: Option<CookiePartitionKey>,
}
Expand description
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. setCookie
Fields§
§name: String
Cookie name.
value: String
Cookie 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.
http_only: Option<bool>
True if cookie is http-only.
same_site: Option<CookieSameSite>
Cookie SameSite type.
expires: Option<TimeSinceEpoch>
Cookie expiration date, session cookie if not set
priority: Option<CookiePriority>
Cookie Priority type.
same_party: Option<bool>
True if cookie is SameParty.
source_scheme: Option<CookieSourceScheme>
Cookie source scheme type.
source_port: 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.
partition_key: Option<CookiePartitionKey>
Cookie partition key. If not set, the cookie will be set as not partitioned.
Implementations§
Source§impl SetCookieParams
impl SetCookieParams
pub fn builder() -> SetCookieParamsBuilder
Source§impl SetCookieParams
impl SetCookieParams
pub const IDENTIFIER: &'static str = "Network.setCookie"
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 moreSource§impl Command for SetCookieParams
impl Command for SetCookieParams
Source§impl Debug for SetCookieParams
impl Debug for SetCookieParams
Source§impl<'de> Deserialize<'de> for SetCookieParams
impl<'de> Deserialize<'de> for SetCookieParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SetCookieParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SetCookieParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Method for SetCookieParams
impl Method for SetCookieParams
Source§fn identifier(&self) -> Cow<'static, str>
fn identifier(&self) -> Cow<'static, str>
DOM.removeNode
Source§fn domain_name(&self) -> Cow<'static, str>
fn domain_name(&self) -> Cow<'static, str>
DOM
Source§fn method_name(&self) -> Cow<'static, str>
fn method_name(&self) -> Cow<'static, str>
removeNode
Source§impl MethodType for SetCookieParams
impl MethodType for SetCookieParams
Source§impl PartialEq for SetCookieParams
impl PartialEq for SetCookieParams
Source§impl Serialize for SetCookieParams
impl Serialize for SetCookieParams
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for SetCookieParams
Auto Trait Implementations§
impl Freeze for SetCookieParams
impl RefUnwindSafe for SetCookieParams
impl Send for SetCookieParams
impl Sync for SetCookieParams
impl Unpin for SetCookieParams
impl UnwindSafe for SetCookieParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more