pub struct PluginManager { /* private fields */ }Expand description
Plugin manager for MCP servers
Implementations§
Source§impl PluginManager
impl PluginManager
Sourcepub async fn load_plugin(&self, config: PluginConfig) -> PluginResult<()>
pub async fn load_plugin(&self, config: PluginConfig) -> PluginResult<()>
Load a plugin from configuration
Sourcepub async fn unload_plugin(&self, plugin_id: &str) -> PluginResult<()>
pub async fn unload_plugin(&self, plugin_id: &str) -> PluginResult<()>
Unload a plugin
Sourcepub async fn reload_plugin(&self, plugin_id: &str) -> PluginResult<()>
pub async fn reload_plugin(&self, plugin_id: &str) -> PluginResult<()>
Reload a plugin
Sourcepub async fn enable_plugin(&self, plugin_id: &str) -> PluginResult<()>
pub async fn enable_plugin(&self, plugin_id: &str) -> PluginResult<()>
Enable a plugin
Sourcepub async fn disable_plugin(&self, plugin_id: &str) -> PluginResult<()>
pub async fn disable_plugin(&self, plugin_id: &str) -> PluginResult<()>
Disable a plugin
Sourcepub async fn is_enabled(&self, plugin_id: &str) -> bool
pub async fn is_enabled(&self, plugin_id: &str) -> bool
Check if a plugin is enabled
Sourcepub async fn execute_tool(
&self,
tool_name: &str,
arguments: Value,
) -> McpResult<ToolResult>
pub async fn execute_tool( &self, tool_name: &str, arguments: Value, ) -> McpResult<ToolResult>
Execute a tool from a plugin
Sourcepub async fn list_tools(&self) -> Vec<Tool>
pub async fn list_tools(&self) -> Vec<Tool>
List all available tools
Sourcepub async fn list_plugins(&self) -> Vec<PluginMetadata>
pub async fn list_plugins(&self) -> Vec<PluginMetadata>
List all loaded plugins
Sourcepub async fn load_from_directory(&self, dir: &Path) -> McpResult<LoadResult>
pub async fn load_from_directory(&self, dir: &Path) -> McpResult<LoadResult>
Load all plugins from a configuration directory, returning detailed results
Sourcepub async fn add_search_path(&self, path: impl Into<PathBuf>)
pub async fn add_search_path(&self, path: impl Into<PathBuf>)
Add a plugin search path
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PluginManager
impl !UnwindSafe for PluginManager
impl Freeze for PluginManager
impl Send for PluginManager
impl Sync for PluginManager
impl Unpin for PluginManager
impl UnsafeUnpin for PluginManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].