pub struct AdaptiveRate { /* private fields */ }Expand description
Adaptive rate controller that adjusts pps based on observed packet loss.
Implementations§
Source§impl AdaptiveRate
impl AdaptiveRate
Sourcepub fn report_success(&mut self)
pub fn report_success(&mut self)
Report a successful batch (all packets sent).
Sourcepub fn report_drops(&mut self, _drop_count: u64)
pub fn report_drops(&mut self, _drop_count: u64)
Report packet drops.
Sourcepub fn current_pps(&self) -> u64
pub fn current_pps(&self) -> u64
Current recommended rate.
Auto Trait Implementations§
impl Freeze for AdaptiveRate
impl RefUnwindSafe for AdaptiveRate
impl Send for AdaptiveRate
impl Sync for AdaptiveRate
impl Unpin for AdaptiveRate
impl UnsafeUnpin for AdaptiveRate
impl UnwindSafe for AdaptiveRate
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