Skip to main content

PluginBuilder

Trait PluginBuilder 

Source
pub trait PluginBuilder: Send + Sync {
    // Required method
    fn build(self) -> Box<dyn ToolPlugin>;

    // Provided method
    fn build_with_config(self, _config: Value) -> McpResult<Box<dyn ToolPlugin>>
       where Self: Sized { ... }
}
Expand description

Helper trait for plugin builders

Required Methods§

Source

fn build(self) -> Box<dyn ToolPlugin>

Build the plugin instance

Provided Methods§

Source

fn build_with_config(self, _config: Value) -> McpResult<Box<dyn ToolPlugin>>
where Self: Sized,

Build with configuration

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§