pub enum SetCookieBlockedReason {
Show 22 variants
SecureOnly,
SameSiteStrict,
SameSiteLax,
SameSiteUnspecifiedTreatedAsLax,
SameSiteNoneInsecure,
UserPreferences,
ThirdPartyPhaseout,
ThirdPartyBlockedInFirstPartySet,
SyntaxError,
SchemeNotSupported,
OverwriteSecure,
InvalidDomain,
InvalidPrefix,
UnknownError,
SchemefulSameSiteStrict,
SchemefulSameSiteLax,
SchemefulSameSiteUnspecifiedTreatedAsLax,
SamePartyFromCrossPartyContext,
SamePartyConflictsWithOtherAttributes,
NameValuePairExceedsMaxSize,
DisallowedCharacter,
NoCookieContent,
}
Expand description
Types of reasons why a cookie may not be stored from a response.
Variants§
SecureOnly
The cookie had the “Secure” attribute but was not received over a secure connection.
SameSiteStrict
The cookie had the “SameSite=Strict” attribute but came from a cross-origin response. This includes navigation requests initiated by other origins.
SameSiteLax
The cookie had the “SameSite=Lax” attribute but came from a cross-origin response.
SameSiteUnspecifiedTreatedAsLax
The cookie didn’t specify a “SameSite” attribute and was defaulted to “SameSite=Lax” and broke the same rules specified in the SameSiteLax value.
SameSiteNoneInsecure
The cookie had the “SameSite=None” attribute but did not specify the “Secure” attribute, which is required in order to use “SameSite=None”.
UserPreferences
The cookie was not stored due to user preferences.
ThirdPartyPhaseout
The cookie was blocked due to third-party cookie phaseout.
ThirdPartyBlockedInFirstPartySet
The cookie was blocked by third-party cookie blocking between sites in the same First-Party Set.
SyntaxError
The syntax of the Set-Cookie header of the response was invalid.
SchemeNotSupported
The scheme of the connection is not allowed to store cookies.
OverwriteSecure
The cookie was not sent over a secure connection and would have overwritten a cookie with the Secure attribute.
InvalidDomain
The cookie’s domain attribute was invalid with regards to the current host url.
InvalidPrefix
The cookie used the “__Secure-” or “__Host-” prefix in its name and broke the additional rules applied to cookies with these prefixes as defined in https://tools.ietf.org/html/draft-west-cookie-prefixes-05
UnknownError
An unknown error was encountered when trying to store this cookie.
SchemefulSameSiteStrict
The cookie had the “SameSite=Strict” attribute but came from a response with the same registrable domain but a different scheme. This includes navigation requests initiated by other origins. This is the “Schemeful Same-Site” version of the blocked reason.
SchemefulSameSiteLax
The cookie had the “SameSite=Lax” attribute but came from a response with the same registrable domain but a different scheme. This is the “Schemeful Same-Site” version of the blocked reason.
SchemefulSameSiteUnspecifiedTreatedAsLax
The cookie didn’t specify a “SameSite” attribute and was defaulted to “SameSite=Lax” and broke the same rules specified in the SchemefulSameSiteLax value. This is the “Schemeful Same-Site” version of the blocked reason.
SamePartyFromCrossPartyContext
The cookie had the “SameParty” attribute but came from a cross-party response.
SamePartyConflictsWithOtherAttributes
The cookie had the “SameParty” attribute but did not specify the “Secure” attribute (which is required in order to use “SameParty”); or specified the “SameSite=Strict” attribute (which is forbidden when using “SameParty”).
NameValuePairExceedsMaxSize
The cookie’s name/value pair size exceeded the size limit defined in RFC6265bis.
DisallowedCharacter
The cookie contained a forbidden ASCII control character, or the tab character if it appears in the middle of the cookie name, value, an attribute name, or an attribute value.
NoCookieContent
Cookie contains no content or only whitespace.
Trait Implementations§
Source§impl AsRef<str> for SetCookieBlockedReason
impl AsRef<str> for SetCookieBlockedReason
Source§impl Clone for SetCookieBlockedReason
impl Clone for SetCookieBlockedReason
Source§fn clone(&self) -> SetCookieBlockedReason
fn clone(&self) -> SetCookieBlockedReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SetCookieBlockedReason
impl Debug for SetCookieBlockedReason
Source§impl<'de> Deserialize<'de> for SetCookieBlockedReason
impl<'de> Deserialize<'de> for SetCookieBlockedReason
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SetCookieBlockedReason, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SetCookieBlockedReason, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl FromStr for SetCookieBlockedReason
impl FromStr for SetCookieBlockedReason
Source§impl Hash for SetCookieBlockedReason
impl Hash for SetCookieBlockedReason
Source§impl PartialEq for SetCookieBlockedReason
impl PartialEq for SetCookieBlockedReason
Source§impl Serialize for SetCookieBlockedReason
impl Serialize for SetCookieBlockedReason
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 Eq for SetCookieBlockedReason
impl StructuralPartialEq for SetCookieBlockedReason
Auto Trait Implementations§
impl Freeze for SetCookieBlockedReason
impl RefUnwindSafe for SetCookieBlockedReason
impl Send for SetCookieBlockedReason
impl Sync for SetCookieBlockedReason
impl Unpin for SetCookieBlockedReason
impl UnwindSafe for SetCookieBlockedReason
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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