pub struct SessionOptions {
pub expires_in: Option<u64>,
pub update_age: Option<u64>,
pub fresh_age: Option<u64>,
pub disable_session_refresh: bool,
pub defer_session_refresh: bool,
pub store_session_in_database: bool,
pub preserve_session_in_database: bool,
pub cookie_cache: CookieCacheOptions,
pub additional_fields: BTreeMap<String, SessionAdditionalField>,
}Expand description
Session configuration.
Fields§
§expires_in: Option<u64>§update_age: Option<u64>§fresh_age: Option<u64>§disable_session_refresh: bool§defer_session_refresh: bool§store_session_in_database: bool§preserve_session_in_database: bool§additional_fields: BTreeMap<String, SessionAdditionalField>Implementations§
Source§impl SessionOptions
impl SessionOptions
pub fn new() -> SessionOptions
pub fn builder() -> SessionOptions
pub fn expires_in(self, expires_in: u64) -> SessionOptions
pub fn update_age(self, update_age: u64) -> SessionOptions
pub fn fresh_age(self, fresh_age: u64) -> SessionOptions
pub fn disable_session_refresh(self, disabled: bool) -> SessionOptions
pub fn defer_session_refresh(self, deferred: bool) -> SessionOptions
pub fn store_session_in_database(self, enabled: bool) -> SessionOptions
pub fn preserve_session_in_database(self, enabled: bool) -> SessionOptions
pub fn additional_field( self, name: impl Into<String>, field: SessionAdditionalField, ) -> SessionOptions
Trait Implementations§
Source§impl Clone for SessionOptions
impl Clone for SessionOptions
Source§fn clone(&self) -> SessionOptions
fn clone(&self) -> SessionOptions
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 SessionOptions
impl Debug for SessionOptions
Source§impl Default for SessionOptions
impl Default for SessionOptions
Source§fn default() -> SessionOptions
fn default() -> SessionOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for SessionOptions
impl PartialEq for SessionOptions
impl StructuralPartialEq for SessionOptions
Auto Trait Implementations§
impl Freeze for SessionOptions
impl RefUnwindSafe for SessionOptions
impl Send for SessionOptions
impl Sync for SessionOptions
impl Unpin for SessionOptions
impl UnsafeUnpin for SessionOptions
impl UnwindSafe for SessionOptions
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