pub struct CookieOptions { /* private fields */ }Expand description
Options used by response cookie helpers.
Implementations§
Source§impl CookieOptions
impl CookieOptions
pub fn new() -> Self
pub fn with_path(self, path: impl Into<String>) -> Self
pub fn without_path(self) -> Self
pub fn with_domain(self, domain: impl Into<String>) -> Self
pub fn without_domain(self) -> Self
pub fn with_max_age(self, max_age: Duration) -> Self
pub fn with_max_age_seconds(self, max_age: u64) -> Self
pub fn without_max_age(self) -> Self
pub fn with_http_only(self, http_only: bool) -> Self
pub fn with_secure(self, secure: bool) -> Self
pub fn with_same_site(self, same_site: CookieSameSite) -> Self
pub fn without_same_site(self) -> Self
pub fn path(&self) -> Option<&str>
pub fn domain(&self) -> Option<&str>
pub fn max_age_seconds(&self) -> Option<u64>
pub fn http_only(&self) -> bool
pub fn secure(&self) -> bool
pub fn same_site(&self) -> Option<CookieSameSite>
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
Source§impl Default for CookieOptions
impl Default for CookieOptions
impl Eq for CookieOptions
Source§impl PartialEq for CookieOptions
impl PartialEq for CookieOptions
impl StructuralPartialEq 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