-
Notifications
You must be signed in to change notification settings - Fork 144
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
Can't have single use renderables #24
Comments
To see whether this would work I attempted to implement it (https://git.nemo157.com/forks/maud/commit/f1ecd07). Took a while to work out how to get it working, but finally realised that emulating the |
I threw together an implementation of |
Cheers for the report. I agree that having a way to render a value by-move would be useful. But I'm hesitant about making that the default. After all, As for |
I can't think of any real use case for |
Since
Render
takes itself by reference anything that implements it needs to support re-rendering multiple times. While working on supporting modified event streams in (second example atmaud-pulldown-cmark
) I found this limiting aspulldown_cmark::Parser
isn't reusable, requiring me to wrap stuff up in closures to allow re-creating the parser when necessary. In most cases it's very unlikely that these structs would be kept around, so I was wondering if it were possible to havefn render(self, w: &mut Write) -> fmt::Result
and provide implementations for references where needed.The text was updated successfully, but these errors were encountered: