[][src]Enum discv5::Discv5Event

pub enum Discv5Event {
    Discovered(RawEnr<CombinedKey>),
    EnrAdded {
        enr: RawEnr<CombinedKey>,
        replaced: Option<RawEnr<CombinedKey>>,
    },
    NodeInserted {
        node_id: NodeId,
        replaced: Option<NodeId>,
    },
    SocketUpdated(SocketAddr),
    FindNodeResult {
        key: NodeId,
        closer_peers: Vec<RawEnr<CombinedKey>>,
        query_id: QueryId,
    },
}

Event that can be produced by the Discv5 service.

Variants

Discovered(RawEnr<CombinedKey>)

A node has been discovered from a FINDNODES request.

The ENR of the node is returned. Various properties can be derived from the ENR.

  • NodeId: enr.node_id()
  • SeqNo: enr.seq_no()
  • Ip: enr.ip()
EnrAdded

A new ENR was added to the routing table.

Fields of EnrAdded

enr: RawEnr<CombinedKey>replaced: Option<RawEnr<CombinedKey>>
NodeInserted

A new node has been added to the routing table.

Fields of NodeInserted

node_id: NodeIdreplaced: Option<NodeId>
SocketUpdated(SocketAddr)

Our local ENR IP address has been updated.

FindNodeResult

Result of a FIND_NODE iterative query.

Fields of FindNodeResult

key: NodeId

The key that we looked for in the query.

closer_peers: Vec<RawEnr<CombinedKey>>

List of peers ordered from closest to furthest away.

query_id: QueryId

Id of the query this result fulfils

Trait Implementations

impl Debug for Discv5Event[src]

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, 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>,