Skip to main content

render

Function render 

Source
pub fn render(
    protocol_data: Buffer,
    state_json: String,
    entry: String,
    request_path: String,
    on_chunk: Function<'_, String, ()>,
    plugin: Option<String>,
) -> Result<()>
Expand description

Render a pre-compiled WebUI protocol with JSON state, streaming each fragment to the provided callback.

§Arguments

  • protocol_data — Protobuf binary from webui build (zero-copy Buffer).
  • state_json — JSON string with the render state.
  • on_chunk — Called with each rendered HTML fragment as it is produced.
  • plugin — Optional plugin identifier (see crate documentation for available identifiers).