Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept generics in AggregateState for aggregate id #116

Open
cottinisimone opened this issue Oct 6, 2022 · 1 comment
Open

Accept generics in AggregateState for aggregate id #116

cottinisimone opened this issue Oct 6, 2022 · 1 comment
Assignees

Comments

@cottinisimone
Copy link
Contributor

The idea is based on possibly having a NewType for the aggregate id, so be more flexible in handling those types.

Possible solutions could be:

  • Add a new generic type to AggregateState with consequent associated type in Aggregate to have a T (like AggregateId type) implementing Into<Uuid> and From<Uuid>.
  • Modify AggregateState::new to get an impl Into<Uuid>
@cottinisimone cottinisimone changed the title Change AggregateState::new to get a generic type Accept generics in AggregateState Oct 6, 2022
@cottinisimone cottinisimone changed the title Accept generics in AggregateState Accept generics in AggregateState for aggregate id Oct 6, 2022
@cottinisimone
Copy link
Contributor Author

I propose to put this when rust-lang/rfcs#2532 will be included in the stdlib. The issue: rust-lang/rust#29661

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

No branches or pull requests

2 participants