pub trait DiscoveryBackend:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &str;
fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), DiscoveryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn poll<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Vec<DiscoveredPeer>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), DiscoveryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Discovery backend trait.
Required Methods§
Sourcefn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), DiscoveryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), DiscoveryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the discovery mechanism.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".