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

Adding RenderContext trait so users can provide access to arbitrary structs without converting it all into a Value #929

Closed
wants to merge 1 commit into from

Conversation

brosander
Copy link

I think that this will help users expose more extensive data structures to Tera without needing to recursively convert to a Value when rendering.

The existing api should still be compatible because both Context and any immutable borrow of a RenderContext will implement RenderContext so the render calls in tera.rs should still work with &Context.

I don't think I've changed any logic for the Context rendering. It is all confined to the RenderContext trait definition now though.

…tructs without converting it all into a Value
@Keats
Copy link
Owner

Keats commented Jul 15, 2024

Nothing like that is going to be merged, all work is happening in https://github.com/Keats/tera2 which is a rewrite from scratch

@Keats
Copy link
Owner

Keats commented Jul 15, 2024

#637 (comment) if you want to see details. If that still works on the new version I will have a look.
Ideally something like what ramhorns is doing would be great for everything that is not a hashmap tbh

@Keats Keats closed this Jul 15, 2024
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.

2 participants