pub trait NetworkConnector:
Send
+ Sync
+ 'static {
// Required method
fn connect(
&self,
uri: Uri,
) -> Pin<Box<dyn Future<Output = Result<NetworkConnection, Box<dyn StdError + Send + Sync>>> + Send>>;
}Expand description
Network connector trait with type erasure
Required Methods§
fn connect( &self, uri: Uri, ) -> Pin<Box<dyn Future<Output = Result<NetworkConnection, Box<dyn StdError + Send + Sync>>> + Send>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".