pub struct PluginBuilder { /* private fields */ }Expand description
Plugin builder for configuration
Provides a fluent API for building plugin metadata.
§Example
use llm_memory_graph::plugin::PluginBuilder;
let metadata = PluginBuilder::new("my_plugin", "1.0.0")
.author("John Doe")
.description("My custom plugin")
.capability("validation")
.capability("enrichment")
.build();Implementations§
Source§impl PluginBuilder
impl PluginBuilder
Sourcepub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
Create a new plugin builder
Set the plugin author
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the plugin description
Sourcepub fn api_version(self, version: impl Into<String>) -> Self
pub fn api_version(self, version: impl Into<String>) -> Self
Set the API version
Sourcepub fn capability(self, capability: impl Into<String>) -> Self
pub fn capability(self, capability: impl Into<String>) -> Self
Add a capability
Sourcepub fn config_schema(self, schema: Value) -> Self
pub fn config_schema(self, schema: Value) -> Self
Set the configuration schema
Sourcepub fn build(self) -> PluginMetadata
pub fn build(self) -> PluginMetadata
Build the plugin metadata
Auto Trait Implementations§
impl Freeze for PluginBuilder
impl RefUnwindSafe for PluginBuilder
impl Send for PluginBuilder
impl Sync for PluginBuilder
impl Unpin for PluginBuilder
impl UnwindSafe for PluginBuilder
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