pub struct PluginRegistry { /* private fields */ }Expand description
Registry mapping component type names to plugin implementations.
Created empty by default. Plugins are registered at application startup.
Follows the same HashMap<String, Box<dyn T>> pattern as LayoutRegistry.
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub fn register(&mut self, plugin: impl JsonUiPlugin + 'static)
pub fn register(&mut self, plugin: impl JsonUiPlugin + 'static)
Register a plugin. Replaces any existing plugin with the same component type.
Sourcepub fn get(&self, component_type: &str) -> Option<&dyn JsonUiPlugin>
pub fn get(&self, component_type: &str) -> Option<&dyn JsonUiPlugin>
Look up a plugin by component type name.
Sourcepub fn registered_types(&self) -> Vec<String>
pub fn registered_types(&self) -> Vec<String>
Return a sorted list of all registered plugin type names.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginRegistry
impl !RefUnwindSafe for PluginRegistry
impl Send for PluginRegistry
impl Sync for PluginRegistry
impl Unpin for PluginRegistry
impl UnsafeUnpin for PluginRegistry
impl !UnwindSafe for PluginRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more