pub struct PluginHost { /* private fields */ }Implementations§
Source§impl PluginHost
impl PluginHost
pub fn empty() -> Self
pub fn new(factories: Vec<Arc<dyn PluginFactory>>) -> Self
pub fn with_extensions(self, extensions: PluginExtensions) -> Self
pub fn isolated_registry(&self) -> Self
pub fn extensions(&self) -> &PluginExtensions
pub fn factories(&self) -> &[Arc<dyn PluginFactory>]
Sourcepub fn install_process_engine_contributions(
&self,
runtime_host: RuntimeHostConfig,
process_lifecycle_available: bool,
) -> Result<RuntimeHostConfig, PluginError>
pub fn install_process_engine_contributions( &self, runtime_host: RuntimeHostConfig, process_lifecycle_available: bool, ) -> Result<RuntimeHostConfig, PluginError>
Ask every factory for its process-engine contributions and register them
on runtime_host, enforcing unique ProcessEngine::kind
across all engines (directly wired or plugin-contributed).
This is the core-owned installation step that replaces facade-level
out-of-band wiring: engine construction that needs the fully-built plugin
host’s extensions runs here, after the host is built. The trace context
handed to factories is the one already on runtime_host.
pub fn build_session( &self, session_id: impl Into<String>, snapshot: Option<&PluginSessionSnapshot>, ) -> Result<Arc<PluginSession>, PluginError>
Sourcepub fn build_session_with_parent(
&self,
session_id: impl Into<String>,
parent_session_id: Option<String>,
snapshot: Option<&PluginSessionSnapshot>,
authority: SessionAuthorityContext,
) -> Result<Arc<PluginSession>, PluginError>
pub fn build_session_with_parent( &self, session_id: impl Into<String>, parent_session_id: Option<String>, snapshot: Option<&PluginSessionSnapshot>, authority: SessionAuthorityContext, ) -> Result<Arc<PluginSession>, PluginError>
Variant of [build_session] that records the caller as the
parent of the new session. Plugin factories read
PluginSessionContext::is_root_session to gate root-only
behavior; anything that goes through the plain build_session
is treated as a root session by default.
pub fn build_session_with_parent_and_overlay( &self, session_id: impl Into<String>, parent_session_id: Option<String>, snapshot: Option<&PluginSessionSnapshot>, tool_catalog_overlay: ToolCatalogContribution, tool_snapshot: Option<ToolState>, authority: SessionAuthorityContext, ) -> Result<Arc<PluginSession>, PluginError>
pub fn build_session_with_overlay( &self, session_id: impl Into<String>, snapshot: Option<&PluginSessionSnapshot>, tool_catalog_overlay: ToolCatalogContribution, tool_snapshot: Option<ToolState>, ) -> Result<Arc<PluginSession>, PluginError>
pub fn unregister_session(&self, session_id: &str) -> Result<(), PluginError>
pub fn session( &self, session_id: &str, ) -> Result<Arc<PluginSession>, PluginOperationInvokeError>
Trait Implementations§
Source§impl Clone for PluginHost
impl Clone for PluginHost
Source§fn clone(&self) -> PluginHost
fn clone(&self) -> PluginHost
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for PluginHost
impl !UnwindSafe for PluginHost
impl Freeze for PluginHost
impl Send for PluginHost
impl Sync for PluginHost
impl Unpin for PluginHost
impl UnsafeUnpin for PluginHost
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