pub struct SessionOptions {
pub schema: ModelSchemaOptions,
pub expires_in: Option<Duration>,
pub update_age: Option<Duration>,
pub fresh_age: Option<Duration>,
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§
§schema: ModelSchemaOptions§expires_in: Option<Duration>§update_age: Option<Duration>§fresh_age: Option<Duration>§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() -> Self
pub fn builder() -> Self
pub fn schema(self, schema: ModelSchemaOptions) -> Self
pub fn expires_in(self, expires_in: Duration) -> Self
pub fn update_age(self, update_age: Duration) -> Self
pub fn fresh_age(self, fresh_age: Duration) -> Self
pub fn disable_session_refresh(self, disabled: bool) -> Self
pub fn defer_session_refresh(self, deferred: bool) -> Self
pub fn store_session_in_database(self, enabled: bool) -> Self
pub fn preserve_session_in_database(self, enabled: bool) -> Self
pub fn additional_field( self, name: impl Into<String>, field: SessionAdditionalField, ) -> Self
Trait Implementations§
Source§impl Clone for SessionOptions
impl Clone for SessionOptions
Source§impl Debug for SessionOptions
impl Debug for SessionOptions
Source§impl Default for SessionOptions
impl Default for SessionOptions
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