pub struct PageHandle<P: PageProps> { /* private fields */ }Expand description
A verified handler contract. Clone it into application state; no constructor
accepts raw slots or an unverified module. Request values are checked before any
HTML is returned. In debug builds a changed module is bound again; an invalid
file keeps the loader’s last good module, while a valid incompatible schema
returns RENDER-405 until the handler or page is corrected.
Implementations§
Source§impl<P: PageProps> PageHandle<P>
impl<P: PageProps> PageHandle<P>
Sourcepub fn limits(&self) -> Limits
pub fn limits(&self) -> Limits
The page defaults selected at bind. A request override does not change them.
Sourcepub fn warnings(&self) -> Vec<PropsWarning>
pub fn warnings(&self) -> Vec<PropsWarning>
Extra Rust fields reported by the currently verified contract. They are omitted from encoded page data, even when their values are unsafe.
Sourcepub fn render(
&self,
props: &P,
ctx: &RenderCtx,
) -> Result<PageResponse, RenderError>
pub fn render( &self, props: &P, ctx: &RenderCtx, ) -> Result<PageResponse, RenderError>
Render with checked handler props and per-request metadata. The default
document title is the name passed to bind; RenderCtx::with_title
overrides it for this request. Head/policy/preload settings keep their
existing typed wrappers. No raw script or HTML string enters this API.