pub struct P2pStatus {
pub enabled: bool,
pub local_peer_id: Option<String>,
pub listen_addresses: Vec<String>,
pub external_addresses: Vec<String>,
pub connected_peers: usize,
pub peer_ids: Vec<String>,
pub subscribed_topics: Vec<String>,
pub topic_peer_counts: HashMap<String, usize>,
}Expand description
P2P network status for monitoring and readiness checks
Fields§
§enabled: boolWhether P2P networking is enabled
local_peer_id: Option<String>Local peer ID
listen_addresses: Vec<String>Listen addresses (multiaddrs with peer ID appended, e.g. “/ip4/0.0.0.0/tcp/9000/p2p/12D3KooW…”)
external_addresses: Vec<String>External addresses discovered via AutoNAT/Identify (preferred for NAT traversal) These are addresses that peers outside NAT can use to reach us.
connected_peers: usizeNumber of connected peers
peer_ids: Vec<String>List of connected peer IDs
subscribed_topics: Vec<String>Topics we’re subscribed to
topic_peer_counts: HashMap<String, usize>Number of peers subscribed to our topics (topic -> peer count)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for P2pStatus
impl<'de> Deserialize<'de> for P2pStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for P2pStatus
impl RefUnwindSafe for P2pStatus
impl Send for P2pStatus
impl Sync for P2pStatus
impl Unpin for P2pStatus
impl UnsafeUnpin for P2pStatus
impl UnwindSafe for P2pStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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