pub enum SameSite {
Strict,
Lax,
None,
}Expand description
The SameSite cookie attribute.
Variants§
Strict
Never sent on any cross-site request.
Lax
Sent on top-level cross-site GET navigations only.
None
Sent on every cross-site request — honored only alongside Secure.
Implementations§
Trait Implementations§
impl Copy for SameSite
impl Eq for SameSite
Source§impl FromStr for SameSite
impl FromStr for SameSite
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parse a SameSite token ASCII-case-insensitively — Strict, Lax, or
None in any case — the inverse of as_str /
Display. Any other token is a ParseSameSiteError. Since
Display always emits the canonical casing, s.to_string().parse()
round-trips.
Source§type Err = ParseSameSiteError
type Err = ParseSameSiteError
The associated error which can be returned from parsing.
impl StructuralPartialEq for SameSite
Auto Trait Implementations§
impl Freeze for SameSite
impl RefUnwindSafe for SameSite
impl Send for SameSite
impl Sync for SameSite
impl Unpin for SameSite
impl UnsafeUnpin for SameSite
impl UnwindSafe for SameSite
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