Skip to content

#[cgp_dispatch] macro improvements#142

Merged
soareschen merged 5 commits intomainfrom
dispatch-macro-improvements
Aug 17, 2025
Merged

#[cgp_dispatch] macro improvements#142
soareschen merged 5 commits intomainfrom
dispatch-macro-improvements

Conversation

@soareschen
Copy link
Collaborator

@soareschen soareschen commented Aug 17, 2025

Summary

This is a follow up on #139 and adds a couple of minor improvements on the #[cgp_dispatch] macro to support more corner cases.

  • The dispatcher trait can now support multiple trait methods
  • Async functions are now properly supported
  • Generic parameters can be specified on the dispatcher trait, provided that the parameter is used in the body.
  • Non-lifetime generic parameters inside trait methods are not supported, due to the lack of support in Rust for non-lifetime higher-ranked trait bounds, a.k.a. quantified constraints.

@soareschen soareschen marked this pull request as ready for review August 17, 2025 09:23
@soareschen soareschen merged commit c7260bc into main Aug 17, 2025
5 checks passed
@soareschen soareschen deleted the dispatch-macro-improvements branch August 17, 2025 09:29
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