Function sc_rpc::utils::pipe_from_stream

source ·
pub async fn pipe_from_stream<S, T>(pending: PendingSubscriptionSink, stream: S)
where S: Stream<Item = T> + Unpin + Send + 'static, T: Serialize + Send + 'static,
Expand description

Feed items to the subscription from the underlying stream.

This is bounded because the underlying streams in substrate are unbounded and if the subscription can’t keep with stream it can cause the buffer to become very large and consume lots of memory.

In such cases the subscription is dropped.