Struct deadpool::unmanaged::PoolConfig
source · pub struct PoolConfig {
pub max_size: usize,
pub timeout: Option<Duration>,
pub runtime: Option<Runtime>,
}
Expand description
Pool configuration.
Fields§
§max_size: usize
Maximum size of the pool.
timeout: Option<Duration>
Timeout for Pool::get()
operation.
runtime: Option<Runtime>
Runtime
to be used.
Implementations§
source§impl PoolConfig
impl PoolConfig
sourcepub fn new(max_size: usize) -> Self
pub fn new(max_size: usize) -> Self
Create a new PoolConfig
without any timeouts.
Trait Implementations§
source§impl Clone for PoolConfig
impl Clone for PoolConfig
source§fn clone(&self) -> PoolConfig
fn clone(&self) -> PoolConfig
Returns a copy of the value. Read more
1.0.0 · 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 PoolConfig
impl Debug for PoolConfig
source§impl Default for PoolConfig
impl Default for PoolConfig
source§fn default() -> Self
fn default() -> Self
Create a PoolConfig
where PoolConfig::max_size
is set to
cpu_count * 4
ignoring any logical CPUs (Hyper-Threading).
impl Copy for PoolConfig
Auto Trait Implementations§
impl RefUnwindSafe for PoolConfig
impl Send for PoolConfig
impl Sync for PoolConfig
impl Unpin for PoolConfig
impl UnwindSafe for PoolConfig
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