pub struct NetworkPeer {
pub id: String,
pub hostname: String,
pub ip: IpAddr,
pub online: bool,
pub cur_addr: Option<String>,
pub relay: Option<String>,
pub os: Option<String>,
pub last_seen: Option<String>,
pub key_expiry: Option<String>,
pub dns_name: Option<String>,
}Expand description
A peer as seen by the network layer (Layer 3).
Contains only information available from the network provider itself (e.g., Tailscale status). No transport or session state.
Fields§
§id: StringStable node ID from the network provider.
hostname: StringHostname on the network (e.g., “truffle-cli-abc123”).
ip: IpAddrNetwork IP address (e.g., 100.x.x.x for Tailscale).
online: boolWhether the peer is currently online.
cur_addr: Option<String>Direct endpoint address, if connected directly.
relay: Option<String>DERP relay name if connection is relayed.
os: Option<String>Operating system of the peer.
last_seen: Option<String>Last time the peer was seen online (RFC 3339 string).
key_expiry: Option<String>Key expiry timestamp (RFC 3339 string).
dns_name: Option<String>DNS name on the tailnet (e.g., “truffle-cli-abc123.tailnet.ts.net”).
Trait Implementations§
Source§impl Clone for NetworkPeer
impl Clone for NetworkPeer
Source§fn clone(&self) -> NetworkPeer
fn clone(&self) -> NetworkPeer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NetworkPeer
impl RefUnwindSafe for NetworkPeer
impl Send for NetworkPeer
impl Sync for NetworkPeer
impl Unpin for NetworkPeer
impl UnsafeUnpin for NetworkPeer
impl UnwindSafe for NetworkPeer
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