pub async fn pipe(
sink: SubscriptionSink,
stream: PlexusStream,
ext: &Extensions,
) -> SubscriptionResultExpand description
Pipe a call’s stream to its accepted subscription: each item encoded once and written as one frame.
With a FrameSink in the call’s extensions (plexus-transport’s socket
loop) each frame goes to the socket’s writer as it is, the first fenced
behind the subscription’s answer; without one, each item goes to
jsonrpsee’s sink as one raw value. A Request item (an in-call
question) is bound to this connection first (BIDIR-13). The pipe ends
when the stream does, or when the caller lets go (an unsubscribe, a lost
socket), dropping the stream at once.