pub struct CookieSessionOptions { /* private fields */ }Expand description
Options for the session id cookie written on commit.
Implementations§
Source§impl CookieSessionOptions
impl CookieSessionOptions
Sourcepub fn new() -> CookieSessionOptions
pub fn new() -> CookieSessionOptions
Cookie name (default DEFAULT_SESSION_COOKIE).
Sourcepub fn with_name(self, name: impl Into<String>) -> CookieSessionOptions
pub fn with_name(self, name: impl Into<String>) -> CookieSessionOptions
Sets the cookie name.
Sourcepub fn with_path(self, path: impl Into<String>) -> CookieSessionOptions
pub fn with_path(self, path: impl Into<String>) -> CookieSessionOptions
Sets the cookie path.
Sourcepub const fn with_http_only(self, http_only: bool) -> CookieSessionOptions
pub const fn with_http_only(self, http_only: bool) -> CookieSessionOptions
Sets the HttpOnly flag.
Sourcepub const fn with_secure(self, secure: bool) -> CookieSessionOptions
pub const fn with_secure(self, secure: bool) -> CookieSessionOptions
Sets the Secure flag.
Sourcepub const fn with_same_site(self, same_site: SameSite) -> CookieSessionOptions
pub const fn with_same_site(self, same_site: SameSite) -> CookieSessionOptions
Sets SameSite.
Sourcepub const fn with_max_age_secs(
self,
max_age_secs: Option<u64>,
) -> CookieSessionOptions
pub const fn with_max_age_secs( self, max_age_secs: Option<u64>, ) -> CookieSessionOptions
Sets Max-Age in seconds (None = session cookie).
Trait Implementations§
Source§impl Clone for CookieSessionOptions
impl Clone for CookieSessionOptions
Source§fn clone(&self) -> CookieSessionOptions
fn clone(&self) -> CookieSessionOptions
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 CookieSessionOptions
impl Debug for CookieSessionOptions
Source§impl Default for CookieSessionOptions
impl Default for CookieSessionOptions
Source§fn default() -> CookieSessionOptions
fn default() -> CookieSessionOptions
Returns the “default value” for a type. Read more
impl Eq for CookieSessionOptions
Source§impl PartialEq for CookieSessionOptions
impl PartialEq for CookieSessionOptions
impl StructuralPartialEq for CookieSessionOptions
Auto Trait Implementations§
impl Forget for CookieSessionOptions
impl Freeze for CookieSessionOptions
impl Move for CookieSessionOptions
impl RefUnwindSafe for CookieSessionOptions
impl Send for CookieSessionOptions
impl Sync for CookieSessionOptions
impl Unpin for CookieSessionOptions
impl UnsafeUnpin for CookieSessionOptions
impl UnwindSafe for CookieSessionOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.