Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.
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

@damymetzke

Description

@damymetzke

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions