Skip to main content

FipsEndpointPeer

Struct FipsEndpointPeer 

Source
pub struct FipsEndpointPeer {
Show 25 fields pub npub: String, pub node_addr: NodeAddr, pub connected: bool, pub transport_addr: Option<String>, pub transport_type: Option<String>, pub link_id: u64, pub srtt_ms: Option<u64>, pub srtt_age_ms: Option<u64>, pub packets_sent: u64, pub packets_recv: u64, pub bytes_sent: u64, pub bytes_recv: u64, pub rekey_in_progress: bool, pub rekey_draining: bool, pub current_k_bit: Option<bool>, pub last_outbound_route: Option<String>, pub direct_probe_pending: bool, pub direct_probe_after_ms: Option<u64>, pub direct_probe_retry_count: u32, pub direct_probe_auto_reconnect: bool, pub direct_probe_expires_at_ms: Option<u64>, pub nostr_traversal_consecutive_failures: u32, pub nostr_traversal_in_cooldown: bool, pub nostr_traversal_cooldown_until_ms: Option<u64>, pub nostr_traversal_last_observed_skew_ms: Option<i64>,
}
Expand description

Authenticated FIPS peer state visible to an embedded application.

Fields§

§npub: String

Peer Nostr public key.

§node_addr: NodeAddr

Peer FIPS node address, derived from the public key and stable across npub encodings.

§connected: bool

Whether an authenticated link-layer peer is currently active.

§transport_addr: Option<String>

Current underlay transport address, when a link has authenticated.

§transport_type: Option<String>

Current underlay transport kind, when known.

§link_id: u64

Authenticated link id.

§srtt_ms: Option<u64>

Smoothed RTT in milliseconds, once measured by FIPS MMP.

§srtt_age_ms: Option<u64>

Age of the current SRTT sample in milliseconds.

§packets_sent: u64

Link packets sent.

§packets_recv: u64

Link packets received.

§bytes_sent: u64

Link bytes sent.

§bytes_recv: u64

Link bytes received.

§rekey_in_progress: bool

Whether a link-layer rekey is currently in progress.

§rekey_draining: bool

Whether this peer is draining an old key during rekey.

§current_k_bit: Option<bool>

Current link-layer key bit for active peers.

§last_outbound_route: Option<String>

Last outbound end-to-end session route: direct when the first hop was the destination peer, fallback when traffic went through another peer.

§direct_probe_pending: bool

Whether direct UDP probing is queued while this peer may still be reachable through a fallback transport.

§direct_probe_after_ms: Option<u64>

Millisecond timestamp when the queued direct probe becomes eligible.

§direct_probe_retry_count: u32

Number of direct probe/retry attempts accumulated for this peer.

§direct_probe_auto_reconnect: bool

Whether the queued direct probe is an unlimited auto-reconnect.

§direct_probe_expires_at_ms: Option<u64>

Millisecond timestamp when a bounded direct probe/retry entry expires.

§nostr_traversal_consecutive_failures: u32

Consecutive Nostr traversal failures recorded for this peer.

§nostr_traversal_in_cooldown: bool

Whether Nostr traversal is currently cooling down for this peer.

§nostr_traversal_cooldown_until_ms: Option<u64>

Millisecond timestamp when Nostr traversal cooldown ends.

§nostr_traversal_last_observed_skew_ms: Option<i64>

Last observed Nostr timestamp skew in milliseconds for this peer.

Implementations§

Source§

impl FipsEndpointPeer

Source

pub fn authenticated_udp_restart_addr(&self) -> Option<SocketAddr>

Return a safe UDP restart candidate from this authenticated snapshot.

A candidate is exposed only while the peer is connected over UDP and the reported address is a reusable SocketAddr. In particular, this never turns TCP source ports, synthetic WebSocket paths, WebRTC signaling identities, or BLE addresses into restart routes.

Trait Implementations§

Source§

impl Clone for FipsEndpointPeer

Source§

fn clone(&self) -> FipsEndpointPeer

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FipsEndpointPeer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for FipsEndpointPeer

Source§

impl PartialEq for FipsEndpointPeer

Source§

fn eq(&self, other: &FipsEndpointPeer) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FipsEndpointPeer

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more