pub enum SameSitePolicy {
Strict,
Lax,
None,
}Expand description
SameSite cookie attribute values (RFC-6265bis).
Variants§
Strict
SameSite=Strict — cookies sent only in same-site requests.
Default and recommended for session cookies (RFC-006 §4).
Lax
SameSite=Lax — cookies sent on top-level cross-site navigation.
Appropriate when the host needs to receive a cookie after a redirect
from an external flow (RFC-006 §13.2 ProductionLax profile).
None
SameSite=None — must always be accompanied by Secure. Not emitted
by any built-in profile; available for framework adapters.
Implementations§
Trait Implementations§
Source§impl Clone for SameSitePolicy
impl Clone for SameSitePolicy
Source§fn clone(&self) -> SameSitePolicy
fn clone(&self) -> SameSitePolicy
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 moreimpl Copy for SameSitePolicy
Source§impl Debug for SameSitePolicy
impl Debug for SameSitePolicy
Source§impl Default for SameSitePolicy
impl Default for SameSitePolicy
Source§fn default() -> SameSitePolicy
fn default() -> SameSitePolicy
Returns the “default value” for a type. Read more
impl Eq for SameSitePolicy
Source§impl PartialEq for SameSitePolicy
impl PartialEq for SameSitePolicy
Source§fn eq(&self, other: &SameSitePolicy) -> bool
fn eq(&self, other: &SameSitePolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SameSitePolicy
Auto Trait Implementations§
impl Freeze for SameSitePolicy
impl RefUnwindSafe for SameSitePolicy
impl Send for SameSitePolicy
impl Sync for SameSitePolicy
impl Unpin for SameSitePolicy
impl UnsafeUnpin for SameSitePolicy
impl UnwindSafe for SameSitePolicy
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