pub struct PeerInfo {
pub address: String,
pub services: String,
pub user_agent: String,
pub initial_height: u32,
pub kind: String,
pub state: String,
pub transport_protocol: String,
}Expand description
General information about our peers. Returned by get_peer_info
Fields§
§address: StringThe network address for this peer.
services: StringA string with the services this peer advertises. E.g. NODE_NETWORK, UTREEXO, WITNESS…
user_agent: StringUser agent is a string that represents the client being used by our peer. E.g. /Satoshi-26.0/ for bitcoin core version 26
initial_height: u32This peer’s height at the time we’ve opened a connection with them
kind: StringThe connection type of this peer
We can connect with peers for different reasons. E.g. we can connect to a peer to see if it has a block we’re missing, or just to check if that address is still alive. Possible values are: Feeler, Regular and Extra
state: StringThe state of this peer
Can be either Ready, Connecting or Banned
transport_protocol: StringThe transport protocol used with peer.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PeerInfo
impl<'de> Deserialize<'de> for PeerInfo
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 PeerInfo
impl RefUnwindSafe for PeerInfo
impl Send for PeerInfo
impl Sync for PeerInfo
impl Unpin for PeerInfo
impl UnwindSafe for PeerInfo
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