Enum sc_network::discovery::DiscoveryOut
source · pub enum DiscoveryOut {
Discovered(PeerId),
UnroutablePeer(PeerId),
ValueFound(Vec<(RecordKey, Vec<u8>)>, Duration),
ValueNotFound(RecordKey, Duration),
ValuePut(RecordKey, Duration),
ValuePutFailed(RecordKey, Duration),
RandomKademliaStarted,
}
Expand description
Event generated by the DiscoveryBehaviour
.
Variants§
Discovered(PeerId)
A connection to a peer has been established but the peer has not been
added to the routing table because [KademliaBucketInserts::Manual
] is
configured. If the peer is to be included in the routing table, it must
be explicitly added via
DiscoveryBehaviour::add_self_reported_address
.
UnroutablePeer(PeerId)
A peer connected to this node for whom no listen address is known.
In order for the peer to be added to the Kademlia routing table, a known
listen address must be added via
DiscoveryBehaviour::add_self_reported_address
, e.g. obtained through
the identify
protocol.
ValueFound(Vec<(RecordKey, Vec<u8>)>, Duration)
The DHT yielded results for the record request.
Returning the result grouped in (key, value) pairs as well as the request duration.
ValueNotFound(RecordKey, Duration)
The record requested was not found in the DHT.
Returning the corresponding key as well as the request duration.
ValuePut(RecordKey, Duration)
The record with a given key was successfully inserted into the DHT.
Returning the corresponding key as well as the request duration.
ValuePutFailed(RecordKey, Duration)
Inserting a value into the DHT failed.
Returning the corresponding key as well as the request duration.
RandomKademliaStarted
Started a random Kademlia query.
Only happens if DiscoveryConfig::with_dht_random_walk
has been configured to true
.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DiscoveryOut
impl Send for DiscoveryOut
impl Sync for DiscoveryOut
impl Unpin for DiscoveryOut
impl UnwindSafe for DiscoveryOut
Blanket Implementations§
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
T
. Read moresource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.