pub type UnicastBuilder<'a, S> = Builder<'a, UnicastKind, S>;Expand description
Unicast packet builder alias.
Aliased Type§
pub struct UnicastBuilder<'a, S> { /* private fields */ }Implementations§
Source§impl<'a> UnicastBuilder<'a, NeedsSource>
impl<'a> UnicastBuilder<'a, NeedsSource>
Sourcepub fn source_hint(self, hint: NodeHint) -> UnicastBuilder<'a, NeedsCounter>
pub fn source_hint(self, hint: NodeHint) -> UnicastBuilder<'a, NeedsCounter>
Encode the source address as a three-byte hint.
Sourcepub fn source_full(self, key: &PublicKey) -> UnicastBuilder<'a, NeedsCounter>
pub fn source_full(self, key: &PublicKey) -> UnicastBuilder<'a, NeedsCounter>
Encode the source address as a full public key.
Source§impl<'a> UnicastBuilder<'a, NeedsCounter>
impl<'a> UnicastBuilder<'a, NeedsCounter>
Sourcepub fn frame_counter(self, counter: u32) -> UnicastBuilder<'a, Configuring>
pub fn frame_counter(self, counter: u32) -> UnicastBuilder<'a, Configuring>
Set the frame counter for the secure packet.
Source§impl<'a> UnicastBuilder<'a, Configuring>
impl<'a> UnicastBuilder<'a, Configuring>
Sourcepub fn flood_hops(self, remaining: u8) -> Self
pub fn flood_hops(self, remaining: u8) -> Self
Set the initial flood-hop budget.
Sourcepub fn region_code(self, code: [u8; 2]) -> Self
pub fn region_code(self, code: [u8; 2]) -> Self
Add the region-code option.
Sourcepub fn trace_route(self) -> Self
pub fn trace_route(self) -> Self
Add an empty trace-route option.
Sourcepub fn trace_signal(self) -> Self
pub fn trace_signal(self) -> Self
Add an empty trace-signal option. Pairs entry-for-entry with trace route, so it is only meaningful alongside it.
Sourcepub fn source_route(self, hops: &[RouterHint]) -> Self
pub fn source_route(self, hops: &[RouterHint]) -> Self
Add a source-route option from a router-hint slice.
Sourcepub fn option(self, number: OptionNumber, value: &[u8]) -> Self
pub fn option(self, number: OptionNumber, value: &[u8]) -> Self
Add an arbitrary option number/value pair.
Source§impl<'a> UnicastBuilder<'a, Configuring>
impl<'a> UnicastBuilder<'a, Configuring>
Sourcepub fn ack_requested(self) -> Self
pub fn ack_requested(self) -> Self
Upgrade the packet type to ACK-requested unicast.
Sourcepub fn mic_size(self, size: MicSize) -> Self
pub fn mic_size(self, size: MicSize) -> Self
Select the MIC size reserved in the packet footer.
Sourcepub fn payload(self, data: &[u8]) -> UnicastBuilder<'a, Complete>
pub fn payload(self, data: &[u8]) -> UnicastBuilder<'a, Complete>
Stage the application payload and advance to the terminal builder state.
Source§impl<'a> UnicastBuilder<'a, Complete>
impl<'a> UnicastBuilder<'a, Complete>
pub fn build(self) -> Result<UnsealedPacket<'a>, BuildError>
Source§impl<'a> UnicastBuilder<'a, Configuring>
impl<'a> UnicastBuilder<'a, Configuring>
Sourcepub fn build(self) -> Result<UnsealedPacket<'a>, BuildError>
pub fn build(self) -> Result<UnsealedPacket<'a>, BuildError>
Layout: FCF [FHOPS] DST SRC SECINFO OPTIONS [0xFF PAYLOAD] MIC