Skip to main content

OpenStream

Trait OpenStream 

Source
pub trait OpenStream: Send + Sync {
    // Required method
    fn open_stream<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn PacketWriter>, PacketReceiver)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for opening streams to a remote server.

Implementations of this trait provide the transport layer for RPC calls. Each call to open_stream should return a new, independent stream.

Required Methods§

Source

fn open_stream<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn PacketWriter>, PacketReceiver)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Opens a new stream and returns a packet writer and a receiver for incoming packets.

Implementors§