pub struct PoolPressureMonitorConfigBuilder { /* private fields */ }Expand description
Builder for PoolPressureMonitorConfig.
Implementations§
Source§impl PoolPressureMonitorConfigBuilder
impl PoolPressureMonitorConfigBuilder
Sourcepub const fn min_pool_size(self, min_pool_size: u32) -> Self
pub const fn min_pool_size(self, min_pool_size: u32) -> Self
Sets the minimum pool size.
Sourcepub const fn max_pool_size(self, max_pool_size: u32) -> Self
pub const fn max_pool_size(self, max_pool_size: u32) -> Self
Sets the maximum pool size.
Sourcepub const fn target_queue_depth(self, target_queue_depth: u32) -> Self
pub const fn target_queue_depth(self, target_queue_depth: u32) -> Self
Sets the maximum queue depth before scaling up.
Sourcepub const fn scale_up_step(self, scale_up_step: u32) -> Self
pub const fn scale_up_step(self, scale_up_step: u32) -> Self
Sets the number of connections to add per scale-up step.
Sourcepub const fn scale_down_step(self, scale_down_step: u32) -> Self
pub const fn scale_down_step(self, scale_down_step: u32) -> Self
Sets the number of connections to remove per scale-down step.
Sourcepub const fn scale_down_idle_ratio(self, scale_down_idle_ratio: f64) -> Self
pub const fn scale_down_idle_ratio(self, scale_down_idle_ratio: f64) -> Self
Sets the minimum idle ratio before considering a scale-down.
Sourcepub const fn tuning_interval_ms(self, tuning_interval_ms: u64) -> Self
pub const fn tuning_interval_ms(self, tuning_interval_ms: u64) -> Self
Sets the polling interval in milliseconds.
Sourcepub const fn samples_before_action(self, samples_before_action: u32) -> Self
pub const fn samples_before_action(self, samples_before_action: u32) -> Self
Sets the number of consecutive samples above threshold before acting.
Sourcepub const fn build(self) -> PoolPressureMonitorConfig
pub const fn build(self) -> PoolPressureMonitorConfig
Builds the PoolPressureMonitorConfig.
Trait Implementations§
Source§impl Default for PoolPressureMonitorConfigBuilder
impl Default for PoolPressureMonitorConfigBuilder
Source§fn default() -> PoolPressureMonitorConfigBuilder
fn default() -> PoolPressureMonitorConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PoolPressureMonitorConfigBuilder
impl RefUnwindSafe for PoolPressureMonitorConfigBuilder
impl Send for PoolPressureMonitorConfigBuilder
impl Sync for PoolPressureMonitorConfigBuilder
impl Unpin for PoolPressureMonitorConfigBuilder
impl UnsafeUnpin for PoolPressureMonitorConfigBuilder
impl UnwindSafe for PoolPressureMonitorConfigBuilder
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more