pub struct PeerInfo {
pub peer_id: PeerId,
pub public_key: PublicKey,
pub protocol_version: String,
pub agent_version: String,
pub listen_addrs: Vec<Multiaddr>,
pub protocols: Vec<StreamProtocol>,
pub observed_addr: Option<Multiaddr>,
}Expand description
Abstraction of IdentifyInfo but includes PeerId
Fields§
§peer_id: PeerIdThe peer id of the user
public_key: PublicKeyThe public key of the local peer.
protocol_version: StringApplication-specific version of the protocol family used by the peer,
e.g. ipfs/1.0.0 or polkadot/1.0.0.
agent_version: StringName and version of the peer, similar to the User-Agent header in
the HTTP protocol.
listen_addrs: Vec<Multiaddr>The addresses that the peer is listening on.
protocols: Vec<StreamProtocol>The list of protocols supported by the peer, e.g. /ipfs/ping/1.0.0.
observed_addr: Option<Multiaddr>Address observed by or for the remote.
Trait Implementations§
source§impl From<Info> for PeerInfo
impl From<Info> for PeerInfo
source§fn from(info: IdentifyInfo) -> Self
fn from(info: IdentifyInfo) -> Self
Converts to this type from the input type.
source§impl PartialEq for PeerInfo
impl PartialEq for PeerInfo
impl Eq for PeerInfo
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.