pub struct SessionConfig { /* private fields */ }Expand description
Configuration controlling cookie attributes, signing, TTL, and capacity for SessionPlugin.
Implementations§
Source§impl SessionConfig
Inherent fluent builders for SessionConfig.
impl SessionConfig
Inherent fluent builders for SessionConfig.
Sourcepub fn with_signing_secret<S>(self, secret: S) -> Self
pub fn with_signing_secret<S>(self, secret: S) -> Self
Sourcepub fn with_ttl_secs(self, ttl_secs: u64) -> Self
pub fn with_ttl_secs(self, ttl_secs: u64) -> Self
Sourcepub fn with_secure(self, secure: bool) -> Self
pub fn with_secure(self, secure: bool) -> Self
Source§impl SessionConfig
impl SessionConfig
pub fn get_same_site(&self) -> &String
pub fn get_mut_same_site(&mut self) -> &mut String
pub fn set_same_site(&mut self, val: String) -> &mut Self
pub fn get_http_only(&self) -> bool
pub fn get_mut_http_only(&mut self) -> &mut bool
pub fn set_http_only(&mut self, val: bool) -> &mut Self
pub fn get_secure(&self) -> bool
pub fn get_mut_secure(&mut self) -> &mut bool
pub fn set_secure(&mut self, val: bool) -> &mut Self
pub fn get_ttl_secs(&self) -> u64
pub fn get_mut_ttl_secs(&mut self) -> &mut u64
pub fn set_ttl_secs(&mut self, val: u64) -> &mut Self
pub fn get_max_sessions(&self) -> usize
pub fn get_mut_max_sessions(&mut self) -> &mut usize
pub fn set_max_sessions(&mut self, val: usize) -> &mut Self
pub fn get_signing_secret(&self) -> Option<Vec<u8>>
pub fn try_get_signing_secret(&self) -> Option<Vec<u8>>
pub fn get_mut_signing_secret(&mut self) -> &mut Option<Vec<u8>>
pub fn set_signing_secret(&mut self, val: Option<Vec<u8>>) -> &mut Self
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§impl Debug for SessionConfig
impl Debug for SessionConfig
Source§impl Default for SessionConfig
Default construction for SessionConfig.
impl Default for SessionConfig
Default construction for SessionConfig.
Source§fn default() -> Self
fn default() -> Self
Constructs a secure default SessionConfig (HttpOnly, SameSite=Lax, 1 hour TTL).
impl Eq for SessionConfig
Source§impl PartialEq for SessionConfig
impl PartialEq for SessionConfig
impl StructuralPartialEq for SessionConfig
Auto Trait Implementations§
impl Forget for SessionConfig
impl Freeze for SessionConfig
impl Move for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfigwhere
RawVecInner: Send,
impl Sync for SessionConfigwhere
RawVecInner: Sync,
impl Unpin for SessionConfig
impl UnsafeUnpin for SessionConfig
impl UnwindSafe for SessionConfigwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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§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.