pub struct CookieOptions {
pub name: String,
pub value: String,
pub path: Option<String>,
pub domain: Option<String>,
pub max_age: Option<i64>,
pub expires: Option<String>,
pub secure: bool,
pub http_only: bool,
pub same_site: SameSite,
}Fields§
§name: String§value: String§path: Option<String>§domain: Option<String>§max_age: Option<i64>§expires: Option<String>§secure: bool§http_only: bool§same_site: SameSiteImplementations§
Source§impl CookieOptions
impl CookieOptions
pub fn new(name: &str, value: &str) -> Self
pub fn path(self, path: &str) -> Self
pub fn domain(self, domain: &str) -> Self
pub fn max_age(self, seconds: i64) -> Self
pub fn expires(self, date: &str) -> Self
pub fn secure(self, secure: bool) -> Self
pub fn http_only(self, http_only: bool) -> Self
pub fn same_site(self, same_site: SameSite) -> Self
pub fn to_header_value(&self) -> String
Trait Implementations§
Source§impl Clone for CookieOptions
impl Clone for CookieOptions
Source§fn clone(&self) -> CookieOptions
fn clone(&self) -> CookieOptions
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 moreSource§impl Debug for CookieOptions
impl Debug for CookieOptions
Auto Trait Implementations§
impl Freeze for CookieOptions
impl RefUnwindSafe for CookieOptions
impl Send for CookieOptions
impl Sync for CookieOptions
impl Unpin for CookieOptions
impl UnsafeUnpin for CookieOptions
impl UnwindSafe for CookieOptions
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