Skip to content

feat: Simplify service event listening API#1332

Merged
vobradovich merged 1 commit into
masterfrom
vo/client-listen-events
Apr 30, 2026
Merged

feat: Simplify service event listening API#1332
vobradovich merged 1 commit into
masterfrom
vo/client-listen-events

Conversation

@vobradovich
Copy link
Copy Markdown
Member

Summary

  • Replace the Service::listener().listen().await flow with direct Service::listen().await
  • Remove the intermediate ServiceListener type
  • Update gtest and gclient listener return types with explicit use<...> captures
  • Update demo, partial IDL, and client-gen tests to use the new direct listener API

@vobradovich vobradovich self-assigned this Apr 29, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request simplifies the event listening API by removing the ServiceListener struct and allowing users to call .listen() directly on service clients. It also introduces the new Rust precise capturing syntax (use<...>) for the Listener trait. Feedback was provided regarding inconsistencies in the capture lists within the GclientEnv and GtestEnv implementations, which should include Self to match the trait definition.

Comment thread rs/src/client/gclient_env.rs
Comment thread rs/src/client/gtest_env.rs
@vobradovich vobradovich merged commit 8685505 into master Apr 30, 2026
4 checks passed
@vobradovich vobradovich deleted the vo/client-listen-events branch April 30, 2026 10:36
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