pub trait Network<L, Si, St>:
Clone
+ Send
+ Sync
+ 'static{
// Required methods
fn bind(
&self,
socket: SocketAddr,
) -> impl Future<Output = Result<L, Error>> + Send;
fn dial(
&self,
socket: SocketAddr,
) -> impl Future<Output = Result<(Si, St), Error>> + Send;
}
Expand description
Interface that any runtime must implement to create network connections.
Required Methods§
Object Safety§
This trait is not object safe.