Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant