Struct libp2p_core::peer_record::PeerRecord
source · [−]pub struct PeerRecord { /* private fields */ }
Expand description
Represents a peer routing record.
Peer records are designed to be distributable and carry a signature by being wrapped in a signed envelope. For more information see RFC0003 of the libp2p specifications: https://github.com/libp2p/specs/blob/master/RFC/0003-routing-records.md
Implementations
Attempt to re-construct a PeerRecord
from a SignedEnvelope
.
If this function succeeds, the SignedEnvelope
contained a peer record with a valid signature and can hence be considered authenticated.
Construct a new PeerRecord
by authenticating the provided addresses with the given key.
This is the same key that is used for authenticating every libp2p connection of your application, i.e. what you use when setting up your crate::transport::Transport
.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for PeerRecord
impl Send for PeerRecord
impl Sync for PeerRecord
impl Unpin for PeerRecord
impl UnwindSafe for PeerRecord
Blanket Implementations
Mutably borrows from an owned value. Read more