Struct libp2p::identify::IdentifyInfo
source · [−]pub struct IdentifyInfo {
pub public_key: PublicKey,
pub protocol_version: String,
pub agent_version: String,
pub listen_addrs: Vec<Multiaddr, Global>,
pub protocols: Vec<String, Global>,
}
Expand description
Information of a peer sent in Identify
protocol responses.
Fields
public_key: PublicKey
The public key underlying the peer’s PeerId
.
protocol_version: String
Version of the protocol family used by the peer, e.g. ipfs/1.0.0
or polkadot/1.0.0
.
agent_version: String
Name and version of the peer, similar to the User-Agent
header in
the HTTP protocol.
listen_addrs: Vec<Multiaddr, Global>
The addresses that the peer is listening on.
protocols: Vec<String, Global>
The list of protocols supported by the peer, e.g. /ipfs/ping/1.0.0
.
Trait Implementations
sourceimpl Clone for IdentifyInfo
impl Clone for IdentifyInfo
sourcepub fn clone(&self) -> IdentifyInfo
pub fn clone(&self) -> IdentifyInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for IdentifyInfo
impl Send for IdentifyInfo
impl Sync for IdentifyInfo
impl Unpin for IdentifyInfo
impl UnwindSafe for IdentifyInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more