pub fn tee<S>(upstream: S) -> (impl Stream<Item = ClientChunk>, TapReceiver)Expand description
Splits an upstream byte stream into:
- the returned
Streamthat forwards every chunk to the HTTP client (no buffering — the stream is forwarded as it arrives, preserving TTFT) - a
TapReceiverthat yields a (cheap,Arc-backed) clone of every chunk for background reassembly. If the tap channel fills up the chunk is dropped — the client copy is never delayed by the tap.