[][src]Struct iprs::pb::peer_record_proto::PeerRecord

pub struct PeerRecord {
    pub peer_id: Vec<u8>,
    pub seq: u64,
    pub addresses: Vec<AddressInfo>,
}

PeerRecord messages contain information that is useful to share with other peers. Currently, a PeerRecord contains the public listen addresses for a peer, but this is expected to expand to include other information in the future.

PeerRecords are designed to be serialized to bytes and placed inside of SignedEnvelopes before sharing with other peers. See https://github.com/libp2p/go-libp2p-core/record/pb/envelope.proto for the SignedEnvelope definition.

Fields

peer_id: Vec<u8>

peer_id contains a libp2p peer id in its binary representation.

seq: u64

seq contains a monotonically-increasing sequence counter to order PeerRecords in time.

addresses: Vec<AddressInfo>

addresses is a list of public listen addresses for the peer.

Trait Implementations

impl Clone for PeerRecord[src]

impl Debug for PeerRecord[src]

impl Default for PeerRecord[src]

impl Message for PeerRecord[src]

impl PartialEq<PeerRecord> for PeerRecord[src]

impl StructuralPartialEq for PeerRecord[src]

impl TryFrom<PeerRecord> for PeerRecord[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<PeerRecord> for PeerRecord[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,