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

Allow specification of lifetimes in mapping macros #6

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

michaelsproul
Copy link
Member

Improve the flexibility of metastruct's derived mapping macros by allowing a lifetime to be specified. This was useful in implementing some more complex mappings on BeaconState within Lighthouse, see:

https://github.com/sigp/lighthouse/blob/5dac51062c506ff15c1dfdd7cb59a69d81a7cbe9/consensus/types/src/beacon_state/memsize.rs#L17-L90

@michaelsproul michaelsproul changed the title Lifetime tweaks Allow specification of lifetimes in mapping macros Nov 11, 2024
@michaelsproul michaelsproul merged commit 54b12d2 into main Nov 12, 2024
4 of 8 checks passed
@michaelsproul michaelsproul deleted the lifetime-tweaks branch November 12, 2024 00:49
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