pub struct KeyedWorkerPoolConfig { /* private fields */ }Expand description
Configuration for KeyedWorkerPool.
All options default to None. Use the with_* methods to configure the pool.
Implementations§
Source§impl KeyedWorkerPoolConfig
impl KeyedWorkerPoolConfig
Sourcepub fn with_idle_timeout(self, idle_timeout: Option<Duration>) -> Self
pub fn with_idle_timeout(self, idle_timeout: Option<Duration>) -> Self
Sets the maximum duration for which an idle worker is retained.
None disables timeout-based cleanup.
Sourcepub fn with_max_count_per_key(self, max_count: Option<u16>) -> Self
pub fn with_max_count_per_key(self, max_count: Option<u16>) -> Self
Sets the worker-count limit for each primary key.
None leaves per-key counts unlimited. Some(0) is invalid.
Sourcepub fn with_max_idle_count_per_key(self, max_idle_count: Option<u16>) -> Self
pub fn with_max_idle_count_per_key(self, max_idle_count: Option<u16>) -> Self
Sets the idle-worker cache limit for each primary key.
None adds no per-key idle limit. Some(0) disables idle caching.
Trait Implementations§
Source§impl Clone for KeyedWorkerPoolConfig
impl Clone for KeyedWorkerPoolConfig
Source§fn clone(&self) -> KeyedWorkerPoolConfig
fn clone(&self) -> KeyedWorkerPoolConfig
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 KeyedWorkerPoolConfig
impl Debug for KeyedWorkerPoolConfig
Source§impl Default for KeyedWorkerPoolConfig
impl Default for KeyedWorkerPoolConfig
Source§fn default() -> KeyedWorkerPoolConfig
fn default() -> KeyedWorkerPoolConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KeyedWorkerPoolConfig
impl RefUnwindSafe for KeyedWorkerPoolConfig
impl Send for KeyedWorkerPoolConfig
impl Sync for KeyedWorkerPoolConfig
impl Unpin for KeyedWorkerPoolConfig
impl UnsafeUnpin for KeyedWorkerPoolConfig
impl UnwindSafe for KeyedWorkerPoolConfig
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