Skip to content

feat: add drain and spawn_drain to HandlerCtx - #38

Merged
prestwich merged 2 commits into
mainfrom
feat/handler-ctx-drain
Feb 15, 2026
Merged

prestwich merged 2 commits into
mainfrom
feat/handler-ctx-drain

Conversation

@prestwich

Copy link
Copy Markdown
Member

Summary

  • Add HandlerCtx::drain — async method that forwards each item from a Stream into the notification channel
  • Add HandlerCtx::spawn_drain — spawns a cancellable task that drains a stream, auto-cancelled on client disconnect
  • Bump version 0.6.0 → 0.7.0

Test plan

  • cargo clippy -p ajj --all-features --all-targets
  • cargo clippy -p ajj --no-default-features --all-targets
  • cargo t -p ajj

🤖 Generated with Claude Code

Add methods to forward a Stream into the notification channel,
reducing boilerplate for subscription-style handlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@prestwich
prestwich force-pushed the feat/handler-ctx-drain branch from 865a552 to 1294704 Compare February 15, 2026 00:24
@prestwich
prestwich merged commit 1959923 into main Feb 15, 2026
6 checks passed
prestwich added a commit that referenced this pull request Feb 15, 2026
* feat: add notify_stream and spawn_notify_stream to HandlerCtx

Add methods to forward a Stream into the notification channel,
reducing boilerplate for subscription-style handlers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* lint: fmt

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.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.

1 participant