Skip to main content

forward_stream

Function forward_stream 

Source
pub async fn forward_stream<T: Send + 'static>(
    signals: &ConnectionSignals,
    subject: &'static str,
    stream: Pin<Box<dyn Stream<Item = T> + Send>>,
    tx: &Sender<T>,
) -> ForwardOutcome
Expand description

Forwards items from stream into tx, watching signals.connected for disconnections.

Returns ForwardOutcome::Resubscribe when re-subscription is needed and ForwardOutcome::ReceiverDropped when the channel receiver has been closed.