pub enum SameSite {
Strict,
Lax,
}The SameSite cookie attribute.
A cookie with a SameSite attribute is imposed restrictions on when it is
sent to the origin server in a cross-site request. If the SameSite
attribute is "Strict", then the cookie is never sent in cross-site requests.
If the SameSite attribute is "Lax", the cookie is only sent in cross-site
requests with "safe" HTTP methods, i.e, GET, HEAD, OPTIONS, TRACE.
Note: This cookie attribute is an HTTP draft! Its meaning and definition
are subject to change.
The "Strict" SameSite attribute.
The "Lax" SameSite attribute.
Returns true if self is SameSite::Strict and false otherwise.
use cookie::SameSite;
let strict = SameSite::Strict;
assert!(strict.is_strict());
assert!(!strict.is_lax());
Returns true if self is SameSite::Lax and false otherwise.
use cookie::SameSite;
let lax = SameSite::Lax;
assert!(lax.is_lax());
assert!(!lax.is_strict());
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=.
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given [Hasher]. Read more
Feeds a slice of this type into the given [Hasher]. Read more
Converts the given value to a String. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Mutably borrows from an owned value. Read more