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

Handle addable field between patches #37

Closed
1 of 2 tasks
yanganto opened this issue Aug 12, 2024 · 0 comments · Fixed by #49
Closed
1 of 2 tasks

Handle addable field between patches #37

yanganto opened this issue Aug 12, 2024 · 0 comments · Fixed by #49
Labels

Comments

@yanganto
Copy link
Owner

yanganto commented Aug 12, 2024

Do you agree we do this first in this PR, and then, we can discuss which one will be good from Patch(add = "..."), Patch(addable_fields = "..."), and #[patch(addable)] in the next PR?

Sounds good to me.

By the way, what I meant with the patch(add = "...") was to let the dev define function to handle the add:

fn my_add_fx(a: SomeThingPatch, b: SomeThingPatch) {
  ...
}

#[derive(Patch)]
struct OtherThing {
  #[patch(add = "my_add_fx"]
  some_thing: SomeThing,
}

Originally posted by @taorepoara in #32 (comment)

Action Items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant