#[non_exhaustive]pub enum Event {
Discovered(Enr),
NodeInserted {
node_id: NodeId,
replaced: Option<NodeId>,
},
UnverifiableEnr {
enr: Enr,
socket: SocketAddr,
node_id: NodeId,
},
SessionEstablished(Enr, SocketAddr),
SocketUpdated(SocketAddr),
TalkRequest(TalkRequest),
}
Expand description
Events that can be produced by the Discv5
event stream.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Discovered(Enr)
A node has been discovered from a FINDNODES request.
The ENR of the node is returned. Various properties can be derived from the ENR. This happen spontaneously through queries as nodes return ENR’s. These ENR’s are not guaranteed to be live or contactable.
NodeInserted
A new node has been added to the routing table.
UnverifiableEnr
An ENR doesn’t verify against the observed socket and node ID of the peer.
SessionEstablished(Enr, SocketAddr)
A new session has been established with a node.
SocketUpdated(SocketAddr)
Our local ENR IP address has been updated.
TalkRequest(TalkRequest)
A node has initiated a talk request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl !RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl !UnwindSafe for Event
Blanket Implementations§
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