Struct cdp::network::SetCookieCommand
[−]
[src]
pub struct SetCookieCommand<'a> { pub name: Cow<'a, str>, pub value: Cow<'a, str>, pub url: Option<Cow<'a, str>>, pub domain: Option<Cow<'a, str>>, pub path: Option<Cow<'a, str>>, pub secure: Option<bool>, pub http_only: Option<bool>, pub same_site: Option<CookieSameSite>, pub expires: Option<TimeSinceEpoch>, }
[Experimental] Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
Command Network.setCookie
Domain Module: cdp::network
Command Struct: cdp::network::SetCookieCommand
Response Struct: cdp::network::SetCookieResponse
Fields
name: Cow<'a, str>
Cookie name.
value: Cow<'a, str>
Cookie value.
url: Option<Cow<'a, str>>
The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie.
domain: Option<Cow<'a, str>>
Cookie domain.
path: Option<Cow<'a, str>>
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
Trait Implementations
impl<'a> Clone for SetCookieCommand<'a>
[src]
fn clone(&self) -> SetCookieCommand<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for SetCookieCommand<'a>
[src]
impl<'a> PartialEq for SetCookieCommand<'a>
[src]
fn eq(&self, __arg_0: &SetCookieCommand<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SetCookieCommand<'a>) -> bool
[src]
This method tests for !=
.
impl<'a> CdpCommand for SetCookieCommand<'a>
[src]
const COMMAND_NAME: &'static str
COMMAND_NAME: &'static str = "Network.setCookie"
impl<'a> SerializeCdpCommand for SetCookieCommand<'a>
[src]
fn command_name(&self) -> &str
[src]
fn serialize_command_params<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
impl<'de, 'a> DeserializeCdpCommand<'de> for SetCookieCommand<'a>
[src]
fn deserialize_command<D>(
name: &str,
params: D
) -> Result<Result<Self, D::Error>, D> where
D: Deserializer<'de>,
[src]
name: &str,
params: D
) -> Result<Result<Self, D::Error>, D> where
D: Deserializer<'de>,