pub struct PluginContext {
pub llm: Option<Arc<dyn LlmClient>>,
pub skill_registry: Option<Arc<SkillRegistry>>,
}Expand description
Runtime context provided to plugins when they are loaded.
Gives plugins access to shared session dependencies such as the LLM client,
skill registry, and document parser registry without coupling the Plugin
trait to specific concrete types.
Fields§
§llm: Option<Arc<dyn LlmClient>>LLM client — required by tools that do LLM inference.
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_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