pub struct SessionConfig {
pub session_length_secs: i64,
pub expire_inactive_sessions: bool,
}Expand description
The two options that decide a session’s lifetime.
Taken as configuration rather than hardcoded, because both are server options and an operator
can set either. The defaults are upstream’s: sessionLength 31536000 seconds, one year
(Options/Definitions.js:629-634), and expireInactiveSessions true
(Options/Definitions.js:269-274).
Fields§
§session_length_secs: i64§expire_inactive_sessions: boolImplementations§
Source§impl SessionConfig
impl SessionConfig
Sourcepub fn generate_expires_at(&self, now: ParseDate) -> Option<ParseDate>
pub fn generate_expires_at(&self, now: ParseDate) -> Option<ParseDate>
config.generateSessionExpiresAt() (Config.js:910-916).
None when expireInactiveSessions is false, which is upstream’s undefined and which
produces a session that never expires. See resolve_session.
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
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 SessionConfig
impl Debug for SessionConfig
Source§impl Default for SessionConfig
impl Default for SessionConfig
impl Eq for SessionConfig
Source§impl PartialEq for SessionConfig
impl PartialEq for SessionConfig
impl StructuralPartialEq for SessionConfig
Auto Trait Implementations§
impl Freeze for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnsafeUnpin for SessionConfig
impl UnwindSafe for SessionConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.