pub struct WorkerPoolConfig { /* private fields */ }Expand description
Configuration for WorkerPool.
All limits default to None. Use the with_* methods to configure the pool.
Implementations§
Source§impl WorkerPoolConfig
impl WorkerPoolConfig
Sourcepub fn with_max_count(self, max_count: Option<u16>) -> Self
pub fn with_max_count(self, max_count: Option<u16>) -> Self
Sets the maximum total number of workers managed by the pool.
None leaves the count unlimited. Some(0) is invalid.
Sourcepub fn with_max_idle_count(self, max_idle_count: Option<u16>) -> Self
pub fn with_max_idle_count(self, max_idle_count: Option<u16>) -> Self
Sets the independent idle-worker cache limit.
None adds no idle limit. Some(0) disables idle caching.
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.
Trait Implementations§
Source§impl Clone for WorkerPoolConfig
impl Clone for WorkerPoolConfig
Source§fn clone(&self) -> WorkerPoolConfig
fn clone(&self) -> WorkerPoolConfig
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 WorkerPoolConfig
impl Debug for WorkerPoolConfig
Source§impl Default for WorkerPoolConfig
impl Default for WorkerPoolConfig
Source§fn default() -> WorkerPoolConfig
fn default() -> WorkerPoolConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WorkerPoolConfig
impl RefUnwindSafe for WorkerPoolConfig
impl Send for WorkerPoolConfig
impl Sync for WorkerPoolConfig
impl Unpin for WorkerPoolConfig
impl UnsafeUnpin for WorkerPoolConfig
impl UnwindSafe for WorkerPoolConfig
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