pub struct BackpressureConfig {
pub max_concurrent: usize,
pub high_water_mark: f64,
pub low_water_mark: f64,
pub cooldown: Duration,
pub enabled: bool,
}Expand description
Backpressure configuration.
Fields§
§max_concurrent: usizeMaximum concurrent operations.
high_water_mark: f64High water mark (percentage of max_concurrent).
low_water_mark: f64Low water mark (percentage of max_concurrent).
cooldown: DurationCooldown period after applying backpressure.
enabled: boolWhether backpressure is enabled.
Implementations§
Source§impl BackpressureConfig
impl BackpressureConfig
Sourcepub fn high_threshold(&self) -> usize
pub fn high_threshold(&self) -> usize
Get the high water mark threshold.
Sourcepub fn low_threshold(&self) -> usize
pub fn low_threshold(&self) -> usize
Get the low water mark threshold.
Sourcepub fn validate(&self) -> Result<(), BackpressureError>
pub fn validate(&self) -> Result<(), BackpressureError>
Validate the configuration.
Trait Implementations§
Source§impl Clone for BackpressureConfig
impl Clone for BackpressureConfig
Source§impl Debug for BackpressureConfig
impl Debug for BackpressureConfig
Auto Trait Implementations§
impl Freeze for BackpressureConfig
impl RefUnwindSafe for BackpressureConfig
impl Send for BackpressureConfig
impl Sync for BackpressureConfig
impl Unpin for BackpressureConfig
impl UnsafeUnpin for BackpressureConfig
impl UnwindSafe for BackpressureConfig
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