pub struct GutterDecorationSourceRegistry { /* private fields */ }Expand description
Runtime-mutable registry of AsyncGutterDecorationSources.
The plugin loader RCU-registers a loaded decoration plugin’s producer here
(drain_decorations); the host’s per-tick refresh reads a wait-free
snapshot to drive them. Named generically (not Wasm…) because it holds
native trait objects — mirrors PickerRegistry, whose WASM source is one
implementor among potential natives.
Implementations§
Source§impl GutterDecorationSourceRegistry
impl GutterDecorationSourceRegistry
Sourcepub fn register(&mut self, source: Arc<dyn AsyncGutterDecorationSource>)
pub fn register(&mut self, source: Arc<dyn AsyncGutterDecorationSource>)
Register a producer. Idempotent per source_id: a re-register (reload)
replaces the prior producer for that id rather than accumulating a
duplicate.
Sourcepub fn unregister(&mut self, source_id: u64) -> usize
pub fn unregister(&mut self, source_id: u64) -> usize
Unregister every producer for source_id; returns the count removed
(the teardown-report increment). No-op when absent — idempotent, per the
teardown contract.
Sourcepub fn sources(&self) -> Vec<Arc<dyn AsyncGutterDecorationSource>>
pub fn sources(&self) -> Vec<Arc<dyn AsyncGutterDecorationSource>>
A wait-free snapshot of the registered producers (cheap Arc clones) —
what the host’s refresh iterates.
Trait Implementations§
Source§impl Clone for GutterDecorationSourceRegistry
impl Clone for GutterDecorationSourceRegistry
Source§fn clone(&self) -> GutterDecorationSourceRegistry
fn clone(&self) -> GutterDecorationSourceRegistry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more