Skip to content

Phase 2, Task 7: Refactor process_response_streaming to accept W: Write #574

@aram356

Description

@aram356

Parent: #563
Phase: #567

Summary

Change process_response_streaming from returning Body (with internal Vec<u8>) to writing into a generic W: Write parameter. This enables the streaming path to pass StreamingBody directly.

Changes

  • Change signature: fn process_response_streaming<W: Write>(body: Body, output: &mut W, params: &ProcessResponseParams) -> Result<(), ...>
  • Remove internal let mut output = Vec::new() and Ok(Body::from(output))
  • Update call site in handle_publisher_request to pass &mut Vec::new() (preserves buffered behavior)

File: crates/trusted-server-core/src/publisher.rs:97-180

Plan

See docs/superpowers/plans/2026-03-25-streaming-response.md — Task 7

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions