IdentityRequestContext

Struct IdentityRequestContext 

Source
pub struct IdentityRequestContext<'a> {
    pub from_key: PublicKey,
    pub from_hint: Option<NodeHint>,
    pub source_authenticated: bool,
    pub has_full_source: bool,
    pub channel: Option<ChannelId>,
    pub family: PacketFamily,
    pub filters: IdentityRequestFilters<'a>,
    pub rssi: Option<i16>,
    pub snr: Option<Snr>,
}
Expand description

Reception context for an incoming Identity Request, handed to the respond policy so it can decide whether — and how — to answer.

The request has already passed the filter gate (its FILTER_* options select this node) and its source has already been resolved to a key, so the policy only governs the “do I want to answer this sender?” decision.

Fields§

§from_key: PublicKey

Resolved sender key. Always present: an unresolvable source is dropped before the policy runs.

§from_hint: Option<NodeHint>

Sender hint, when the frame carried one.

§source_authenticated: bool

Whether the request frame was authenticated (pairwise or channel MIC).

§has_full_source: bool

Whether the request carried the sender’s full 32-byte key.

§channel: Option<ChannelId>

The channel the request arrived on, if any (None for plain broadcast/unicast).

§family: PacketFamily

Coarse packet family (Unicast / Broadcast / Multicast / BlindUnicast).

§filters: IdentityRequestFilters<'a>

The request’s filter/option block, for policies that inspect it further.

§rssi: Option<i16>

Received signal strength of the request, if measured.

§snr: Option<Snr>

Signal-to-noise ratio of the request, if measured.

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.