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

Add support for remaining pattern syntax (..) in templates #1073

Open
damymetzke opened this issue Jun 25, 2024 · 0 comments
Open

Add support for remaining pattern syntax (..) in templates #1073

damymetzke opened this issue Jun 25, 2024 · 0 comments

Comments

@damymetzke
Copy link

I do not believe there is a syntax available in the template syntax to pattern match on remaining values, like how you can do with structs in regular Rust:

MyStruct { foo, bar, ... } = my_struct

This would help in situations with large structs that are reused in multiple templates. One situation I'm dealing with now is that I send the same session context variable to all my templates, where each of them need just a few of the values. Right now, I need to update all templates if I add any new values to the session context.

I would be interested in writing a patch for this, however I can't find the time right now. I'm planning to pick this up myself later if it hasn't been done already.

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

1 participant