-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Render to Writer
#187
Labels
Comments
I see no reason not to do this. Seems reasonable. |
epage
added a commit
to epage/liquid-rust
that referenced
this issue
Sep 5, 2018
This is hopefully better than string concatenation, especially if you can write directly to file. Fixes cobalt-org#187 BREAKING CHANGE: `parser.render` now takes an `std::io::Write` rather than return a `String`.
Started on an implementation in #192 but its a lot of tests to fix. |
epage
added a commit
to epage/liquid-rust
that referenced
this issue
Sep 5, 2018
`render_to` uses an `io::Write`. This is hopefully better than string concatenation, especially if you can write directly to file. `render` is still available for convinience (though it no longer returns an `Option`). Fixes cobalt-org#187 BREAKING CHANGES: Changed focus to `io::Write` - `Renderable`s must implement `render_to`. - `render` no longer returns an `Option`.
epage
added a commit
to epage/liquid-rust
that referenced
this issue
Sep 5, 2018
`render_to` uses an `io::Write`. This is hopefully better than string concatenation, especially if you can write directly to file. `render` is still available for convinience (though it no longer returns an `Option`). Fixes cobalt-org#187 BREAKING CHANGES: Changed focus to `io::Write` - `Renderable`s must implement `render_to`. - `render` no longer returns an `Option`.
epage
added a commit
to epage/liquid-rust
that referenced
this issue
Sep 5, 2018
`render_to` uses an `io::Write`. This is hopefully better than string concatenation, especially if you can write directly to file. `render` is still available for convinience (though it no longer returns an `Option`). Fixes cobalt-org#187 BREAKING CHANGES: Changed focus to `io::Write` - `Renderable`s must implement `render_to`. - `render` no longer returns an `Option`.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
From @emoon
Also the ability to to do
Template::render_to<W: Write>(&mut dest: W, ...)
would be useful as well as now I always have to copy the resulting data to my destination (while Template would have been able to write to it directly, removing the copy and memory allocation)The text was updated successfully, but these errors were encountered: