StreamSource

Trait StreamSource 

Source
pub trait StreamSource<T> {
    // Required method
    fn recv(
        &mut self,
    ) -> Pin<Box<dyn Future<Output = Option<Result<T, RpcError>>> + Send + '_>>;
}
Expand description

A source for receiving streaming items (used in client-streaming).

This is an internal building block for future client-streaming support.

Required Methods§

Source

fn recv( &mut self, ) -> Pin<Box<dyn Future<Output = Option<Result<T, RpcError>>> + Send + '_>>

Receive the next item, or None if the stream is complete.

Implementors§