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>,
}
Expand description

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

Creates new CookieOptions

Creates new CookieOptions with name

Creates new CookieOptions with max_age

Creates new CookieOptions with domain

Creates new CookieOptions with path

Creates new CookieOptions with secure

Creates new CookieOptions with http_only

Creates new CookieOptions with same_site

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.