Skip to main content

Module decoration_source

Module decoration_source 

Source
Expand description

PH7.9c — the WasmDecorationSource adapter (the async-produce path).

Wraps a decoration plugin’s DecorationClient bridge and exposes a native-typed producer the host polls off the render path. Like WasmCompletionSource (PH7.6), this is NOT an Arc<dyn> impl of the sync Mode::gutter_decorations trait — that trait is read per frame by the renderer, and a WASM mode can’t satisfy it inline (per-frame WASM = paramount-#1 violation). Instead the host calls this producer on a trigger (edit / scroll / diagnostic change), caches the returned Vec<GutterDecoration> per buffer, and the renderer reads the cache. This adapter is the host-facing “decoration source” a boot-wired Editor will poll (the renderer-reads-the-cache wiring is the Phase-8 boot-wiring step).

Structs§

WasmDecorationSource
An async gutter-decoration producer over a plugin’s DecorationClient. Cheap to clone (the client is an mpsc Sender clone); every clone talks to the same actor / Store.