pub trait AutoDiscoveryGossip {
// Required methods
async fn subscribe_and_join_with_auto_discovery(
&self,
record_publisher: RecordPublisher,
) -> Result<Topic>;
async fn subscribe_and_join_with_auto_discovery_no_wait(
&self,
record_publisher: RecordPublisher,
) -> Result<Topic>;
}Expand description
Extension trait for iroh Gossip enabling auto-discovery.
Required Methods§
Sourceasync fn subscribe_and_join_with_auto_discovery(
&self,
record_publisher: RecordPublisher,
) -> Result<Topic>
async fn subscribe_and_join_with_auto_discovery( &self, record_publisher: RecordPublisher, ) -> Result<Topic>
Subscribe to a topic and bootstrap with DHT peer discovery.
Starts bootstrap and waits until at least one neighbor connection is established.
Returns a Topic for sending/receiving messages.
Sourceasync fn subscribe_and_join_with_auto_discovery_no_wait(
&self,
record_publisher: RecordPublisher,
) -> Result<Topic>
async fn subscribe_and_join_with_auto_discovery_no_wait( &self, record_publisher: RecordPublisher, ) -> Result<Topic>
Subscribe to a topic and bootstrap asynchronously.
Returns immediately with a Topic while bootstrap proceeds in background.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".