pub struct CandidateDiscoveryManager { /* private fields */ }Expand description
Main candidate discovery manager coordinating all discovery phases
Implementations§
Source§impl CandidateDiscoveryManager
impl CandidateDiscoveryManager
Sourcepub fn new(config: DiscoveryConfig, _role: NatTraversalRole) -> Self
pub fn new(config: DiscoveryConfig, _role: NatTraversalRole) -> Self
Create a new candidate discovery manager
Sourcepub fn start_discovery(
&mut self,
peer_id: PeerId,
bootstrap_nodes: Vec<BootstrapNode>,
) -> Result<(), DiscoveryError>
pub fn start_discovery( &mut self, peer_id: PeerId, bootstrap_nodes: Vec<BootstrapNode>, ) -> Result<(), DiscoveryError>
Start candidate discovery for a specific peer
Sourcepub fn poll(&mut self, now: Instant) -> Vec<DiscoveryEvent>
pub fn poll(&mut self, now: Instant) -> Vec<DiscoveryEvent>
Poll for discovery progress and state updates
Sourcepub fn get_status(&self) -> DiscoveryStatus
pub fn get_status(&self) -> DiscoveryStatus
Get current discovery status
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if discovery is complete
Sourcepub fn get_results(&self) -> Option<DiscoveryResults>
pub fn get_results(&self) -> Option<DiscoveryResults>
Get final discovery results
Auto Trait Implementations§
impl Freeze for CandidateDiscoveryManager
impl !RefUnwindSafe for CandidateDiscoveryManager
impl Send for CandidateDiscoveryManager
impl !Sync for CandidateDiscoveryManager
impl Unpin for CandidateDiscoveryManager
impl !UnwindSafe for CandidateDiscoveryManager
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