You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the amazing and often overlooked benefits of a logic-less template is that the templates can be interrogated for the context variables they require, and the structure of the required context can be inferred from that.
It'd be great if Ramhorns could expose this functionality, ideally in a nicer way even than the Ruby Mustache does. As a glorious aspiration, being able to feed the inference from a template into Serde would be magic.
The text was updated successfully, but these errors were encountered:
Having access to all context would be interesting in the case you want to call an "expensive" resource to load the values before processing the template.
I have a case for that, where instead of calling an API for each variable, I would be able to call the API passing a list of variables and just assemble the struct with its response...
I also see a use case in checking the MissingFields like a template validation of sorts...
One of the amazing and often overlooked benefits of a logic-less template is that the templates can be interrogated for the context variables they require, and the structure of the required context can be inferred from that.
As an example use case (in Ruby), see https://github.com/nyarly/diecut
It'd be great if Ramhorns could expose this functionality, ideally in a nicer way even than the Ruby Mustache does. As a glorious aspiration, being able to feed the inference from a template into Serde would be magic.
The text was updated successfully, but these errors were encountered: