pub struct PluginContext {
pub llm: Option<Arc<dyn LlmClient>>,
pub document_parsers: Option<Arc<DocumentParserRegistry>>,
pub skill_registry: Option<Arc<SkillRegistry>>,
}Expand description
Runtime context provided to plugins when they are loaded.
Gives plugins access to dependencies they may need (LLM client,
skill registry, document parser registry, etc.) without coupling the
Plugin trait to specific concrete types.
Fields§
§llm: Option<Arc<dyn LlmClient>>LLM client — required by tools that do LLM inference (e.g. agentic_parse).
document_parsers: Option<Arc<DocumentParserRegistry>>Document parser registry — required by document-aware tools.
skill_registry: Option<Arc<SkillRegistry>>Skill registry — plugins may register companion skills here.
Implementations§
Source§impl PluginContext
impl PluginContext
pub fn new() -> Self
pub fn with_llm(self, llm: Arc<dyn LlmClient>) -> Self
pub fn with_document_parsers( self, registry: Arc<DocumentParserRegistry>, ) -> Self
pub fn with_skill_registry(self, registry: Arc<SkillRegistry>) -> Self
Trait Implementations§
Source§impl Clone for PluginContext
impl Clone for PluginContext
Source§fn clone(&self) -> PluginContext
fn clone(&self) -> PluginContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PluginContext
impl !RefUnwindSafe for PluginContext
impl Send for PluginContext
impl Sync for PluginContext
impl Unpin for PluginContext
impl UnsafeUnpin for PluginContext
impl !UnwindSafe for PluginContext
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