SendProgressTicket

Struct SendProgressTicket 

Source
pub struct SendProgressTicket { /* private fields */ }
Expand description

Lightweight handle for observing the progress of an in-flight send.

The dispatcher updates the internal TicketState synchronously from the MAC event callback. The application queries progress at its own pace via polling methods (was_transmitted, was_acked, is_finished, etc.).

Dropping the ticket unregisters it from the dispatcher (via Weak reference invalidation). The MAC continues the in-flight send — dropping only stops observation, not the send itself.

Implementations§

Source§

impl SendProgressTicket

Source

pub fn token(&self) -> Option<SendToken>

The identity-scoped send token, if this is an ACK-tracked send.

Source

pub fn receipt(&self) -> Option<SendReceipt>

The underlying receipt, if this is an ACK-tracked send.

Source

pub fn was_transmitted(&self) -> bool

True after the frame was handed to the radio at least once.

For all send types, this reflects actual radio transmission: it becomes true when the MAC fires the Transmitted event for this ticket’s receipt.

Source

pub fn was_repeated(&self) -> bool

True after a repeater was overheard forwarding this frame.

Source

pub fn was_acked(&self) -> bool

True after a transport ACK was received from the destination.

Source

pub fn has_failed(&self) -> bool

True when the ACK timed out — all retransmits exhausted without ACK.

Source

pub fn is_finished(&self) -> bool

True when the MAC is completely done — no more retransmissions, no more events will fire for this ticket.

For non-ACK sends (broadcast/multicast), this becomes true immediately after the first radio transmission. For ACK-tracked sends, this becomes true after an ACK is received or all retransmits are exhausted.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.