pub struct PluginInstance {
pub plugin: Arc<dyn Plugin>,
pub handlers: Vec<(&'static str, Arc<dyn AnyHookHandler>)>,
}Expand description
A created plugin instance — the plugin and its type-erased handlers.
Each handler is paired with the hook name it handles. A plugin
that implements multiple hook types (e.g., ToolPreInvoke and
ToolPostInvoke) returns one entry per hook.
Fields§
§plugin: Arc<dyn Plugin>The plugin implementation.
handlers: Vec<(&'static str, Arc<dyn AnyHookHandler>)>Type-erased handlers paired with their hook names. Each entry maps a hook name to the adapter for that hook type.
Auto Trait Implementations§
impl !RefUnwindSafe for PluginInstance
impl !UnwindSafe for PluginInstance
impl Freeze for PluginInstance
impl Send for PluginInstance
impl Sync for PluginInstance
impl Unpin for PluginInstance
impl UnsafeUnpin for PluginInstance
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