pub struct PeerInfo {
pub id: u32,
pub address: SocketAddr,
pub services: ServiceFlags,
pub user_agent: String,
pub initial_height: u32,
pub state: PeerStatus,
pub kind: ConnectionKind,
pub transport_protocol: TransportProtocol,
}Expand description
A struct representing a peer connected to the node.
This struct contains information about a peer connected to the node, like its address, the services it provides, the user agent it’s using, the height of the blockchain it’s currently at, its state and the kind of connection it has with the node.
Fields§
§id: u32§address: SocketAddr§services: ServiceFlags§user_agent: String§initial_height: u32§state: PeerStatus§kind: ConnectionKind§transport_protocol: TransportProtocolTrait Implementations§
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