pub struct RetransmitController { /* private fields */ }Available on crate feature
transport only.Expand description
Retransmission controller.
Tracks retransmission state and applies exponential backoff.
Implementations§
Source§impl RetransmitController
impl RetransmitController
Sourcepub fn should_retransmit(&self, unacked_data: bool) -> bool
pub fn should_retransmit(&self, unacked_data: bool) -> bool
Check if we should retransmit now.
Sourcepub fn on_retransmit(&mut self)
pub fn on_retransmit(&mut self)
Record that we’re retransmitting.
Sourcepub fn retransmit_count(&self) -> u32
pub fn retransmit_count(&self) -> u32
Get the current retransmit count.
Sourcepub fn time_until_retransmit(&self) -> Option<Duration>
pub fn time_until_retransmit(&self) -> Option<Duration>
Get time until next retransmit is allowed.
Trait Implementations§
Source§impl Clone for RetransmitController
impl Clone for RetransmitController
Source§fn clone(&self) -> RetransmitController
fn clone(&self) -> RetransmitController
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 moreAuto Trait Implementations§
impl Freeze for RetransmitController
impl RefUnwindSafe for RetransmitController
impl Send for RetransmitController
impl Sync for RetransmitController
impl Unpin for RetransmitController
impl UnwindSafe for RetransmitController
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