Skip to content

Make nested html! invocations lazy #381

Description

@mattfbacon

Related to #373.

For patterns like this:

fn body() -> Markup { ... }

html! {
  h1 { "My page" }
  main { (body()) }
}

There is technically no need for the intermediate buffer from body, because the markup could render directly into the outer buffer.

In my ideal API, Markup would just implement Render (the render method would have to return something other than Markup, probably just PreEscaped<String>) and take advantage of the existing render_to method.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions