pub struct Aimd { /* private fields */ }Available on crate feature
adaptive only.Expand description
Additive-increase, multiplicative-decrease.
On success — but only while the limit is actually being used — the limit grows by a fixed step; on failure it is cut by a multiplier. The classic congestion response: probe upward gently, retreat sharply.
§Examples
use throttle_net::{Aimd, AdaptiveLimiter};
// Grow by 1 on a saturated success, halve on failure; limit in [4, 200].
let limiter = AdaptiveLimiter::builder()
.floor(4)
.ceiling(200)
.build(Aimd::new(1, 0.5));Implementations§
Trait Implementations§
Source§impl AdaptiveStrategy for Aimd
impl AdaptiveStrategy for Aimd
impl Copy for Aimd
Auto Trait Implementations§
impl Freeze for Aimd
impl RefUnwindSafe for Aimd
impl Send for Aimd
impl Sync for Aimd
impl Unpin for Aimd
impl UnsafeUnpin for Aimd
impl UnwindSafe for Aimd
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