pub struct CookieParam<'a> { /* private fields */ }Expand description
Cookie parameter object
Implementations§
Source§impl<'a> CookieParam<'a>
impl<'a> CookieParam<'a>
Sourcepub fn builder(
name: impl Into<Cow<'a, str>>,
value: impl Into<Cow<'a, str>>,
) -> CookieParamBuilder<'a>
pub fn builder( name: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>, ) -> CookieParamBuilder<'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.
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> Clone for CookieParam<'a>
impl<'a> Clone for CookieParam<'a>
Source§fn clone(&self) -> CookieParam<'a>
fn clone(&self) -> CookieParam<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for CookieParam<'a>
impl<'a> Debug for CookieParam<'a>
Source§impl<'a> Default for CookieParam<'a>
impl<'a> Default for CookieParam<'a>
Source§fn default() -> CookieParam<'a>
fn default() -> CookieParam<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for CookieParam<'a>
impl<'de, 'a> Deserialize<'de> for CookieParam<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for CookieParam<'a>
impl<'a> RefUnwindSafe for CookieParam<'a>
impl<'a> Send for CookieParam<'a>
impl<'a> Sync for CookieParam<'a>
impl<'a> Unpin for CookieParam<'a>
impl<'a> UnsafeUnpin for CookieParam<'a>
impl<'a> UnwindSafe for CookieParam<'a>
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