pub struct PeerState {
pub id: String,
pub name: String,
pub ip: IpAddr,
pub online: bool,
pub connected: bool,
pub connection_type: String,
pub os: Option<String>,
pub last_seen: Option<String>,
}Expand description
A peer’s state in the session registry.
Combines Layer 3 network information (discovery, addressing) with Layer 5 session state (connection status). Peers are added to the registry when Layer 3 reports them, NOT when transport connections are established.
Fields§
§id: StringStable node ID from the network provider.
name: StringHuman-readable name (hostname from Layer 3).
ip: IpAddrNetwork IP address.
online: boolWhether the peer is currently online (from Layer 3).
connected: boolWhether the peer has an active WebSocket connection.
connection_type: StringConnection type description (e.g., “direct” or “relay:ord”).
os: Option<String>Operating system of the peer, if known.
last_seen: Option<String>Last time the peer was seen online (RFC 3339 string).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeerState
impl RefUnwindSafe for PeerState
impl Send for PeerState
impl Sync for PeerState
impl Unpin for PeerState
impl UnsafeUnpin for PeerState
impl UnwindSafe for PeerState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more