pub trait Renderer: Send + Sync {
type Output;
type Context: Default;
// Required method
fn render(
&self,
service: &ServiceDef,
intents: &[IntentScore],
ctx: &Self::Context,
) -> Result<Self::Output, Error>;
}Expand description
Trait for rendering a service definition into output of an associated type.
Implementations translate ServiceDef + scored intents into renderer-specific
output. The associated Output and Context types allow renderers to operate
on different targets (JSON-UI visual trees, template contexts, voice payloads,
etc.) without coupling to any single output format.