pub struct PendingAck<const FRAME: usize = MAX_RESEND_FRAME_LEN> {
pub ack_tag: [u8; 8],
pub peer: PublicKey,
pub resend: ResendRecord<FRAME>,
pub sent_ms: u64,
pub ack_deadline_ms: u64,
pub retries: u8,
pub state: AckState,
}Expand description
Complete tracking state for one in-flight ACK-requested transmission.
The coordinator’s IdentitySlot maintains a LinearMap of
PendingAck records keyed by SendReceipt, one per active ACK-requested send. The
record holds everything needed to detect completion, detect timeout, and retransmit:
ack_tag— the 8-byte CMAC-derived value that will appear in the destination’s MAC ACK packet. Only a node that received and successfully decrypted the original frame can produce the correct tag, so a matchingack_tagis cryptographic proof of delivery.peer— the destination’s full public key, used to look up the correct pending entry when matching an inbound MAC ACK against the pending table.resend— a verbatim copy of the sealed frame for retransmission. SeeResendRecord.sent_ms— the monotonic millisecond timestamp at which the frame was first transmitted; useful for latency measurement.ack_deadline_ms— absolute deadline for the final ACK. Expiry means failure and the entry is removed.retries— the number of retransmissions already attempted; capped atMAX_FORWARD_RETRIES.state— current position in theAckStatelifecycle (forwarding confirmation wait or final-ACK wait).
Use PendingAck::direct for sends to nodes in direct radio range, or
PendingAck::forwarded when routing through a repeater.
Fields§
§ack_tag: [u8; 8]Internal ACK tag used for inbound matching.
peer: PublicKeyFinal destination peer.
resend: ResendRecord<FRAME>Retransmission data.
sent_ms: u64Initial send timestamp in milliseconds.
ack_deadline_ms: u64Absolute deadline for the final ACK.
retries: u8Number of retries already attempted.
state: AckStateCurrent state in the ACK lifecycle.
Implementations§
Source§impl<const FRAME: usize> PendingAck<FRAME>
impl<const FRAME: usize> PendingAck<FRAME>
Trait Implementations§
Source§impl<const FRAME: usize> Clone for PendingAck<FRAME>
impl<const FRAME: usize> Clone for PendingAck<FRAME>
Source§fn clone(&self) -> PendingAck<FRAME>
fn clone(&self) -> PendingAck<FRAME>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const FRAME: usize> Debug for PendingAck<FRAME>
impl<const FRAME: usize> Debug for PendingAck<FRAME>
Source§impl<const FRAME: usize> PartialEq for PendingAck<FRAME>
impl<const FRAME: usize> PartialEq for PendingAck<FRAME>
impl<const FRAME: usize> Eq for PendingAck<FRAME>
impl<const FRAME: usize> StructuralPartialEq for PendingAck<FRAME>
Auto Trait Implementations§
impl<const FRAME: usize> Freeze for PendingAck<FRAME>
impl<const FRAME: usize> RefUnwindSafe for PendingAck<FRAME>
impl<const FRAME: usize> Send for PendingAck<FRAME>
impl<const FRAME: usize> Sync for PendingAck<FRAME>
impl<const FRAME: usize> Unpin for PendingAck<FRAME>
impl<const FRAME: usize> UnwindSafe for PendingAck<FRAME>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)