#[non_exhaustive]pub struct SessionPoolOptions {
pub max_pool_size: usize,
pub session_config: SessionConfig,
pub persist_state_key: String,
}Expand description
Session pool capacity, creation, and persistence settings.
use millipede_core::session::SessionPoolOptions;
assert_eq!(SessionPoolOptions::default().max_pool_size, 1000);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_pool_size: usizeMaximum number of retained sessions.
session_config: SessionConfigConfiguration cloned into new and restored sessions.
persist_state_key: StringKVS key used by explicit persistence.
Implementations§
Source§impl SessionPoolOptions
impl SessionPoolOptions
Sourcepub fn with_max_pool_size(self, value: usize) -> Self
pub fn with_max_pool_size(self, value: usize) -> Self
Sets the maximum retained session count.
Sourcepub fn with_session_config(self, value: SessionConfig) -> Self
pub fn with_session_config(self, value: SessionConfig) -> Self
Sets configuration for pool sessions.
Sourcepub fn with_persist_state_key(self, value: impl Into<String>) -> Self
pub fn with_persist_state_key(self, value: impl Into<String>) -> Self
Sets the persistence key.
Trait Implementations§
Source§impl Clone for SessionPoolOptions
impl Clone for SessionPoolOptions
Source§fn clone(&self) -> SessionPoolOptions
fn clone(&self) -> SessionPoolOptions
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 SessionPoolOptions
impl Debug for SessionPoolOptions
Auto Trait Implementations§
impl Freeze for SessionPoolOptions
impl RefUnwindSafe for SessionPoolOptions
impl Send for SessionPoolOptions
impl Sync for SessionPoolOptions
impl Unpin for SessionPoolOptions
impl UnsafeUnpin for SessionPoolOptions
impl UnwindSafe for SessionPoolOptions
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