pub struct NodeRenderer { /* private fields */ }Implementations§
Source§impl NodeRenderer
impl NodeRenderer
pub fn new(config: RendererConfig) -> Self
Sourcepub async fn warm_up(&self) -> Result<(), RendererError>
pub async fn warm_up(&self) -> Result<(), RendererError>
Start every configured worker and validate its protocol/contract handshake before accepting production traffic.
§Errors
Returns the first process, protocol, or identity error.
pub fn health(&self) -> RendererHealth
Sourcepub async fn render(
&self,
envelope: &PageEnvelope,
context: &RenderContext,
) -> Result<RenderResult, RendererError>
pub async fn render( &self, envelope: &PageEnvelope, context: &RenderContext, ) -> Result<RenderResult, RendererError>
Render one page through the persistent worker pool.
Capacity waiting is included in the deadline. A broken child is replaced once; application renderer rejections are not retried.
§Errors
Returns an error for shutdown, contract drift, process failures, timeout, rejection, or invalid protocol data.
Sourcepub fn render_stream(
&self,
envelope: &PageEnvelope,
context: &RenderContext,
) -> Result<RendererStream, RendererError>
pub fn render_stream( &self, envelope: &PageEnvelope, context: &RenderContext, ) -> Result<RendererStream, RendererError>
Start a framed streaming render. Each HTML chunk is delivered as it is produced, followed by one completion frame containing head/island data.
§Errors
Returns immediately for shutdown or page/build identity mismatches.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NodeRenderer
impl !UnwindSafe for NodeRenderer
impl Freeze for NodeRenderer
impl Send for NodeRenderer
impl Sync for NodeRenderer
impl Unpin for NodeRenderer
impl UnsafeUnpin for NodeRenderer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more