Skip to main content

Module render

Module render 

Source
Expand description

The render that returns its failure: try_render, render_browser_shell. The 0.2.2 render: a page with its counts, or a coded error the handler answers.

try_render is the bridge to 3.0.0’s render on a bound page handle: it takes today’s PageConfig and returns what that render will return, Result<PageResponse, RenderError>. It sits beside the deprecated render_page, which keeps its Phase 1 fallback.

Structs§

RenderCtx
What a render takes beyond PageConfig: the policy’s typed extensions, the walk’s budgets, and the typed homes for what applications used to put in body_prefix: the route’s modulepreload links from the build’s manifest, and head links. Never a nonce: the render draws one per response. Data goes through PageConfig::config_json.

Enums§

RenderError
Why a page was not rendered. Nothing reaches the browser unless the handler sends it: answer with the application’s own error page.

Functions§

render_browser_shell
Serve a route the build declares browser-rendered (ssr: false): the nonced bundle and the same headers as any page, around an empty root.
try_render
Render a page on the server: the page with its counts, or why not.