Skip to content

Expose shared backend references through stream wrappers - #6

Open
xenorune wants to merge 1 commit into
xenorune/quinn-send-stoppedfrom
xenorune/h3-stream-get-ref
Open

xenorune wants to merge 1 commit into
xenorune/quinn-send-stoppedfrom
xenorune/h3-stream-get-ref

Conversation

@xenorune

Copy link
Copy Markdown
Member

What

Add inherent get_ref(&self) -> &S accessors to h3::stream::BufRecvStream and h3_webtransport::stream::SendStream, with API documentation, five public behavioral regressions and additive fork provenance.

Why

Applications need to capture backend-specific completion observation while retaining buffered bytes and WebTransport session-guard ownership. This stacks on PR #5 at 7b9ea7c1dc7e61ec20960344a112bfc9514bbd0e and enables its native Quinn observer through the wrappers without changing generic finish semantics or introducing a mandatory QUIC trait method.

How

Each accessor returns a shared backend reference. The WebTransport accessor forwards through the buffered wrapper. The implementation adds no task, callback, queue, mutable accessor, consuming escape, unsafe code, dependency/MSRV change or Runewarp credit policy. Tests preserve partial buffered bytes/EOF, full session ID four after an ordinary request, exact payloads and independent FIN, cancellation/task-waker release, and session/connection teardown despite live observation.

Native completion limits remain unchanged. stopped(None) establishes FIN/data acknowledgment only on a caller-known normal-FIN path without prior reset. Absent send state after RESET acknowledgment may also return None, STOP can precede RESET acknowledgment, and pending observers have no reliable RESET-ACK wakeup. This does not establish remote application consumption, receive-half release or general abort recovery. Quinn may retain its notification-map entry after observer cancellation.

Local default and all-feature workspace suites each pass 352 tests. Formatting, strict library/changed-test Clippy and strict WebTransport API docs pass. Full Clippy matches the 16 inherited warnings after one new test-waker warning was narrowly corrected; workspace docs retain only six inherited bare-URL warnings. Fresh natural fallback selects Quinn 0.11.9/proto 0.11.14, passes actual Rust 1.74.1 checks for h3/h3-quinn and all five accessor plus four native regressions. Optional WebTransport Rust 1.74.1 checking fails on the same 16 unchanged associated-type-bound errors as the exact base with an independently generated identical natural lock; WebTransport compatibility is not broadened here. The original ignored lock is restored byte for byte. Example tests/builds, the client/server exchange and native h3spec pass, with 43 h3spec cases and five existing exclusions. All owned processes and ports are released. Independent review and CI disposition remain pending with the parent.

🤖 Written by @dtcristo's agent (GPT-6.1 Sol)

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
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.

2 participants