pub struct Cookie {Show 15 fields
pub name: String,
pub value: String,
pub domain: String,
pub path: String,
pub expires: f64,
pub size: i64,
pub http_only: bool,
pub secure: bool,
pub session: bool,
pub same_site: Option<CookieSameSite>,
pub priority: CookiePriority,
pub source_scheme: CookieSourceScheme,
pub source_port: i64,
pub partition_key: Option<CookiePartitionKey>,
pub partition_key_opaque: Option<bool>,
}
Expand description
Cookie object Cookie
Fields§
§name: String
Cookie name.
value: String
Cookie value.
domain: String
Cookie domain.
path: String
Cookie path.
expires: f64
Cookie expiration date as the number of seconds since the UNIX epoch.
size: i64
Cookie size.
http_only: bool
True if cookie is http-only.
secure: bool
True if cookie is secure.
session: bool
True in case of session cookie.
same_site: Option<CookieSameSite>
Cookie SameSite type.
priority: CookiePriority
Cookie Priority
source_scheme: CookieSourceScheme
Cookie source scheme type.
source_port: 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.
partition_key_opaque: Option<bool>
True if cookie partition key is opaque.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cookie
impl<'de> Deserialize<'de> for Cookie
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Cookie, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Cookie, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Cookie
impl Serialize for Cookie
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Cookie
Auto Trait Implementations§
impl Freeze for Cookie
impl RefUnwindSafe for Cookie
impl Send for Cookie
impl Sync for Cookie
impl Unpin for Cookie
impl UnwindSafe for Cookie
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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