Skip to main content

RendererEmitter

Trait RendererEmitter 

Source
pub trait RendererEmitter:
    Send
    + Sync
    + 'static {
    // Required method
    fn Emit(&self, Channel: &str, Payload: Value);
}
Expand description

Cheap-to-clone renderer event sink.

Handlers with long-lived flushers (the channel-drain coalescers used by ProgressReport, DecorationTypeLifecycle, OutputChannelCoalesce) capture an Arc<dyn RendererEmitter> once and reuse it across awaits. Embedders implement this trait on a tiny struct that holds whatever transport handle is needed (e.g. tauri::AppHandle), independent of the full VineHost surface.

Required Methods§

Source

fn Emit(&self, Channel: &str, Payload: Value)

Emits Payload on the renderer’s Channel. Embedders without a renderer leave this a no-op.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§