pub struct PoolConfig {
pub size: usize,
pub engine_config: EngineConfig,
pub acquire_timeout: Duration,
pub lazy_init: bool,
pub max_idle_time: Option<Duration>,
}Expand description
Configuration for an engine pool.
Fields§
§size: usizeNumber of engines in the pool.
engine_config: EngineConfigEngine configuration template.
acquire_timeout: DurationMaximum time to wait for an engine.
lazy_init: boolWhether to create engines lazily.
max_idle_time: Option<Duration>Maximum idle time before an engine is recycled.
Implementations§
Source§impl PoolConfig
impl PoolConfig
Sourcepub fn with_engine_config(self, config: EngineConfig) -> Self
pub fn with_engine_config(self, config: EngineConfig) -> Self
Set the engine configuration.
Sourcepub fn with_limits(self, limits: Limits) -> Self
pub fn with_limits(self, limits: Limits) -> Self
Set resource limits for all engines.
Sourcepub fn with_capabilities(self, capabilities: Capabilities) -> Self
pub fn with_capabilities(self, capabilities: Capabilities) -> Self
Set capabilities for all engines.
Sourcepub fn with_sandbox(self, sandbox: SandboxConfig) -> Self
pub fn with_sandbox(self, sandbox: SandboxConfig) -> Self
Set sandbox configuration for all engines.
Sourcepub fn with_acquire_timeout(self, timeout: Duration) -> Self
pub fn with_acquire_timeout(self, timeout: Duration) -> Self
Set the acquire timeout.
Sourcepub fn with_lazy_init(self, lazy: bool) -> Self
pub fn with_lazy_init(self, lazy: bool) -> Self
Enable lazy initialization.
Sourcepub fn with_max_idle_time(self, time: Option<Duration>) -> Self
pub fn with_max_idle_time(self, time: Option<Duration>) -> Self
Set the maximum idle time.
Trait Implementations§
Source§impl Clone for PoolConfig
impl Clone for PoolConfig
Source§fn clone(&self) -> PoolConfig
fn clone(&self) -> PoolConfig
Returns a duplicate 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
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