Skip to content

Conversation

@ryo33
Copy link
Contributor

@ryo33 ryo33 commented Nov 13, 2025

On 0.6.3, JsonStream::into_inner always returns the valid stream but Streaming::into_inner on 0.7 returns an empty stream on both client and server sides where data was placed in output_stream.

This PR consolidates input_stream/output_stream fields to a single stream field that always returns the actual stream data when into_inner() is called.

Also adds examples demonstrating bidirectional streaming:

  • echo_stream: passes through the received Streaming
  • transform_stream: transforms client stream on server using filter_map (uses .into_inner() on both server and client)

The Streaming struct previously maintained separate input_stream and
output_stream fields, but into_inner() always returned input_stream.
This caused it to return an empty stream on both client and server sides
where data was placed in output_stream.

Consolidate to a single stream field that properly returns the actual
stream data when into_inner() is called.

Also add examples demonstrating bidirectional streaming:
- echo_stream: passes client stream through server unchanged
- transform_stream: transforms client stream on server using filter_map
- Use stream::unfold for cleaner client-side stream generation

Reviewed-by: Claude <[email protected]>
Commit-message-by: Claude <[email protected]>
@ryo33 ryo33 requested a review from a team as a code owner November 13, 2025 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant