Struct sessions_core::CookieOptions[][src]

pub struct CookieOptions {
    pub name: String,
    pub path: String,
    pub max_age: Duration,
    pub secure: Option<bool>,
    pub domain: Option<String>,
    pub http_only: Option<bool>,
    pub same_site: Option<SameSite>,
}

Cookie’s Options

Fields

name: String

Cookie’s name, viz.sid by defaults

path: String

Cookie’s path

max_age: Duration

Cookie’s maximum age, 24H by defaults

secure: Option<bool>

Cookie’s secure

domain: Option<String>

Cookie’s domain

http_only: Option<bool>

Cookie’s http_only

same_site: Option<SameSite>

Cookie’s same_site

Implementations

impl CookieOptions[src]

pub fn new() -> Self[src]

Creates new CookieOptions

pub fn with_name(self, name: String) -> Self[src]

Creates new CookieOptions with name

pub fn with_max_age(self, max_age: Duration) -> Self[src]

Creates new CookieOptions with max_age

pub fn with_domain(self, domain: String) -> Self[src]

Creates new CookieOptions with domain

pub fn with_path(self, path: String) -> Self[src]

Creates new CookieOptions with path

pub fn with_secure(self, secure: bool) -> Self[src]

Creates new CookieOptions with secure

pub fn with_http_only(self, http_only: bool) -> Self[src]

Creates new CookieOptions with http_only

pub fn with_same_site(self, same_site: SameSite) -> Self[src]

Creates new CookieOptions with same_site

Trait Implementations

impl Debug for CookieOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.