Plushie.WidgetRegistry (Plushie v0.6.0)

Copy Markdown View Source

Discovers widgets via Plushie.Widget protocol consolidation.

All modules implementing the Plushie.Widget protocol are widgets. Native widgets (those with Rust crates) additionally export native_crate/0.

Results are cached in :persistent_term after first access. Call invalidate/0 to clear the cache (used by the dev server after protocol reconsolidation).

Summary

Functions

Returns all modules implementing the Plushie.Widget protocol.

Clears the cached widget list. Called by DevServer after reconsolidation.

Returns widget modules that have a native Rust crate.

Functions

all_widgets()

@spec all_widgets() :: [module()]

Returns all modules implementing the Plushie.Widget protocol.

invalidate()

@spec invalidate() :: :ok

Clears the cached widget list. Called by DevServer after reconsolidation.

native_widgets()

@spec native_widgets() :: [module()]

Returns widget modules that have a native Rust crate.