Trait NetworkStreamControl
pub trait NetworkStreamControl: Debug {
// Required methods
fn accept(
self,
) -> Result<impl Stream<Item = (PeerId, impl AsyncRead + AsyncWrite + Send)> + Send, impl Error>;
fn open<'async_trait>(
self,
peer: PeerId,
) -> Pin<Box<dyn Future<Output = Result<impl AsyncRead + AsyncWrite + Send, impl Error>> + Send + 'async_trait>>
where Self: 'async_trait;
}Expand description
Control object for the opening and receiving of network connections in the form of network streams.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.