use std::fmt;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum SameSite {
Strict,
Lax
}
impl SameSite {
#[inline]
pub fn is_strict(&self) -> bool {
match *self {
SameSite::Strict => true,
SameSite::Lax => false
}
}
#[inline]
pub fn is_lax(&self) -> bool {
match *self {
SameSite::Strict => false,
SameSite::Lax => true
}
}
}
impl fmt::Display for SameSite {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
SameSite::Strict => write!(f, "Strict"),
SameSite::Lax => write!(f, "Lax")
}
}
}