pub struct PacketBuilder<'a> { /* private fields */ }Expand description
Entry point for typestate packet construction.
The builder consumes itself as it transitions through required stages so invalid packet layouts are rejected at compile time where possible.
Implementations§
Source§impl<'a> PacketBuilder<'a>
impl<'a> PacketBuilder<'a>
Sourcepub fn broadcast(self) -> BroadcastBuilder<'a, NeedsSource>
pub fn broadcast(self) -> BroadcastBuilder<'a, NeedsSource>
Begin a broadcast packet.
Sourcepub fn mac_ack(self, ack_trailer: [u8; 8]) -> MacAckBuilder<'a, Configuring>
pub fn mac_ack(self, ack_trailer: [u8; 8]) -> MacAckBuilder<'a, Configuring>
Build a MAC ACK packet.
The ack carries no destination hint — it is a return-routed token
correlated by its trailer. ack_trailer is the 8-byte
ack_mic || ack_tag value (see the crypto engine’s
compute_ack_trailer).
Sourcepub fn unicast(self, dst: NodeHint) -> UnicastBuilder<'a, NeedsSource>
pub fn unicast(self, dst: NodeHint) -> UnicastBuilder<'a, NeedsSource>
Begin a unicast packet to dst.
Sourcepub fn multicast(self, channel: ChannelId) -> MulticastBuilder<'a, NeedsSource>
pub fn multicast(self, channel: ChannelId) -> MulticastBuilder<'a, NeedsSource>
Begin a multicast packet on channel.
Sourcepub fn blind_unicast(
self,
channel: ChannelId,
dst: NodeHint,
) -> BlindUnicastBuilder<'a, NeedsSource>
pub fn blind_unicast( self, channel: ChannelId, dst: NodeHint, ) -> BlindUnicastBuilder<'a, NeedsSource>
Begin a blind-unicast packet addressed through channel to dst.