pub struct AdaptiveConfig {
pub min_rate: u64,
pub max_rate: u64,
pub target_utilization: f64,
pub congestion_threshold: f64,
pub recovery_factor: f64,
pub growth_factor: f64,
pub measurement_window_ms: u64,
}Expand description
Configuration for adaptive rate limiting
Fields§
§min_rate: u64Minimum refill rate (bytes per second)
max_rate: u64Maximum refill rate (bytes per second)
target_utilization: f64Target utilization threshold (0.0 to 1.0)
congestion_threshold: f64Congestion detection threshold (0.0 to 1.0)
recovery_factor: f64Recovery factor when congestion is detected (0.0 to 1.0)
growth_factor: f64Growth factor when increasing rate (1.0 to 2.0)
measurement_window_ms: u64Measurement window for rate adjustments (in milliseconds)
Trait Implementations§
Source§impl Clone for AdaptiveConfig
impl Clone for AdaptiveConfig
Source§fn clone(&self) -> AdaptiveConfig
fn clone(&self) -> AdaptiveConfig
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 AdaptiveConfig
impl Debug for AdaptiveConfig
Auto Trait Implementations§
impl Freeze for AdaptiveConfig
impl RefUnwindSafe for AdaptiveConfig
impl Send for AdaptiveConfig
impl Sync for AdaptiveConfig
impl Unpin for AdaptiveConfig
impl UnsafeUnpin for AdaptiveConfig
impl UnwindSafe for AdaptiveConfig
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