pub struct PendingAck {
pub version: u64,
pub sent_at: Instant,
pub retransmit_count: u32,
pub rto: Duration,
}Available on crate feature
sync only.Expand description
Tracks pending acknowledgments for a message
Fields§
§version: u64Version that needs acknowledgment
sent_at: InstantTime when the message was sent
retransmit_count: u32Number of retransmissions
rto: DurationCurrent retransmission timeout
Implementations§
Source§impl PendingAck
impl PendingAck
Sourcepub fn needs_retransmit(&self) -> bool
pub fn needs_retransmit(&self) -> bool
Check if retransmission is needed
Sourcepub fn retransmit(&mut self, backoff_multiplier: u32, max_rto: Duration)
pub fn retransmit(&mut self, backoff_multiplier: u32, max_rto: Duration)
Mark as retransmitted with updated timeout
Sourcepub fn time_until_retransmit(&self) -> Duration
pub fn time_until_retransmit(&self) -> Duration
Time until retransmission is needed
Trait Implementations§
Source§impl Clone for PendingAck
impl Clone for PendingAck
Source§fn clone(&self) -> PendingAck
fn clone(&self) -> PendingAck
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 PendingAck
impl RefUnwindSafe for PendingAck
impl Send for PendingAck
impl Sync for PendingAck
impl Unpin for PendingAck
impl UnwindSafe for PendingAck
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