pub struct Peer {
pub id: String,
pub name: String,
pub ip: IpAddr,
pub online: bool,
pub ws_connected: bool,
pub connection_type: String,
pub os: Option<String>,
pub last_seen: Option<String>,
}Expand description
A peer as seen by application code.
This is a simplified projection of the internal PeerState that hides
session-layer internals. Applications use this to display peer lists and
resolve peer IDs for send() / open_tcp().
Fields§
§id: StringStable node ID.
name: StringHuman-readable name (hostname).
ip: IpAddrNetwork IP address.
online: boolWhether the peer is online (from Layer 3).
ws_connected: boolWhether there is an active WebSocket connection.
connection_type: StringConnection type description (e.g., "direct" or "relay:ord").
os: Option<String>Operating system, if known.
last_seen: Option<String>Last time the peer was seen online (RFC 3339 string).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Peer
impl RefUnwindSafe for Peer
impl Send for Peer
impl Sync for Peer
impl Unpin for Peer
impl UnsafeUnpin for Peer
impl UnwindSafe for Peer
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