pub struct PoolConfig {
pub max_size: usize,
pub timeouts: Timeouts,
pub queue_mode: QueueMode,
}
Expand description
Pool
configuration.
Fields§
§max_size: usize
Maximum size of the Pool
.
Default: cpu_count * 4
timeouts: Timeouts
Timeouts of the Pool
.
Default: No timeouts
queue_mode: QueueMode
Implementations§
source§impl PoolConfig
impl PoolConfig
sourcepub fn new(max_size: usize) -> Self
pub fn new(max_size: usize) -> Self
Creates a new PoolConfig
without any timeouts and with the provided
max_size
.
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
Creates a new PoolConfig
with the max_size
being set to
cpu_count * 4
ignoring any logical CPUs (Hyper-Threading).
impl Copy for PoolConfig
Auto Trait Implementations§
impl Freeze for PoolConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)