pub enum DiscoveryEvent {
DiscoveryStarted {
peer_id: PeerId,
bootstrap_count: usize,
},
LocalScanningStarted,
LocalCandidateDiscovered {
candidate: CandidateAddress,
},
LocalScanningCompleted {
candidate_count: usize,
duration: Duration,
},
ServerReflexiveDiscoveryStarted {
bootstrap_count: usize,
},
ServerReflexiveCandidateDiscovered {
candidate: CandidateAddress,
bootstrap_node: SocketAddr,
},
BootstrapQueryFailed {
bootstrap_node: SocketAddr,
error: String,
},
SymmetricPredictionStarted {
base_address: SocketAddr,
},
PredictedCandidateGenerated {
candidate: CandidateAddress,
confidence: f64,
},
DiscoveryCompleted {
candidate_count: usize,
total_duration: Duration,
success_rate: f64,
},
DiscoveryFailed {
error: DiscoveryError,
partial_results: Vec<CandidateAddress>,
},
}Expand description
Events generated during candidate discovery
Variants§
DiscoveryStarted
Discovery process started
LocalScanningStarted
Local interface scanning started
LocalCandidateDiscovered
Local candidate discovered
Fields
§
candidate: CandidateAddressLocalScanningCompleted
Local interface scanning completed
ServerReflexiveDiscoveryStarted
Server reflexive discovery started
ServerReflexiveCandidateDiscovered
Server reflexive address discovered
BootstrapQueryFailed
Bootstrap node query failed
SymmetricPredictionStarted
Symmetric NAT prediction started
Fields
§
base_address: SocketAddrPredictedCandidateGenerated
Predicted candidate generated
DiscoveryCompleted
Discovery completed successfully
DiscoveryFailed
Discovery failed
Trait Implementations§
Source§impl Clone for DiscoveryEvent
impl Clone for DiscoveryEvent
Source§fn clone(&self) -> DiscoveryEvent
fn clone(&self) -> DiscoveryEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DiscoveryEvent
impl RefUnwindSafe for DiscoveryEvent
impl Send for DiscoveryEvent
impl Sync for DiscoveryEvent
impl Unpin for DiscoveryEvent
impl UnwindSafe for DiscoveryEvent
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