pub trait NetworkManager: Send + Sync {
// Required methods
fn connect<'a>(
&'a mut self,
address: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn PeerConnection>, String>> + Send + 'a>>;
fn accept<'a>(
&'a mut self,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn PeerConnection>, String>> + Send + 'a>>;
fn listen<'a>(
&'a mut self,
bind_address: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'a>>;
}Required Methods§
fn connect<'a>( &'a mut self, address: SocketAddr, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn PeerConnection>, String>> + Send + 'a>>
fn accept<'a>( &'a mut self, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn PeerConnection>, String>> + Send + 'a>>
fn listen<'a>( &'a mut self, bind_address: SocketAddr, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'a>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".