pub type Streaming<T> = Pin<Box<dyn Stream<Item = Result<T, RpcError>> + Send>>;Expand description
Type alias for streaming RPC results.
Service traits should use this in their return types:
ⓘ
async fn range(&self, n: u32) -> Streaming<u32>;The outer async fn gives you the stream, and each item of the stream
is a Result<T, RpcError> representing either a value or an error.
Aliased Type§
pub struct Streaming<T> { /* private fields */ }