pub async fn chunks_to_value(rx: &mut Receiver<ResponseChunk>) -> Result<Value>Expand description
Drain a ResponseChunk stream into a single serde_json::Value.
The inverse of value_to_chunks, used by the non-streaming callers (gRPC,
jobs, and the backward-compat execute path). The result depends on how the
worker finalised the request:
ResponseChunk::Return— the value is returned verbatim (gRPC/jobs need their payload intact, not coerced into the HTTP shape);ResponseChunk::Error— propagated as anErr;- a
Headers/Bodystream with no explicitReturnis reconstructed into the legacy{status, headers, body}shape for backward compatibility.