pub enum SameSite {
Strict,
Lax,
None,
}Variants§
Implementations§
Source§impl SameSite
impl SameSite
Sourcepub fn parse(value: &str) -> Result<Self, ParseSameSiteError>
pub fn parse(value: &str) -> Result<Self, ParseSameSiteError>
Parses a SameSite attribute value.
§Arguments
value: The string representation of theSameSitevalue.
§Returns
A Result containing the parsed SameSite or a ParseSameSiteError.
§Example
use cookie_rs::prelude::*;
let same_site = SameSite::parse("Strict").unwrap();
assert_eq!(same_site, SameSite::Strict);Trait Implementations§
impl Copy for SameSite
impl Eq for SameSite
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 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