pub struct IsolatedPythonPlugin { /* private fields */ }Expand description
A Python plugin running out-of-process in its own virtualenv.
Implementations§
Source§impl IsolatedPythonPlugin
impl IsolatedPythonPlugin
Sourcepub fn from_config(config: &PluginConfig) -> Result<Self, Box<PluginError>>
pub fn from_config(config: &PluginConfig) -> Result<Self, Box<PluginError>>
Build a plugin from its config entry, parsing the venv settings.
Sourcepub fn plugin_dirs(&self) -> &[String]
pub fn plugin_dirs(&self) -> &[String]
The resolved plugin directories — <project root>/plugins.
Sourcepub fn venv_config(&self) -> &VenvConfig
pub fn venv_config(&self) -> &VenvConfig
The parsed venv settings.
Trait Implementations§
Source§impl Plugin for IsolatedPythonPlugin
impl Plugin for IsolatedPythonPlugin
Source§fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<PluginError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<PluginError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Build the venv (or reuse a cached one) and launch the worker.
Heavy setup lives here rather than on the invoke path: the engine awaits this once per plugin, with rollback on failure.
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<PluginError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<PluginError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the worker, killing it if it will not exit on its own.
Source§fn config(&self) -> &PluginConfig
fn config(&self) -> &PluginConfig
Returns the plugin’s configuration. Read more
Source§fn initialize_with<'life0, 'life1, 'async_trait>(
&'life0 self,
ext: &'life1 InitExtensions,
) -> Pin<Box<dyn Future<Output = Result<(), Box<PluginError>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn initialize_with<'life0, 'life1, 'async_trait>(
&'life0 self,
ext: &'life1 InitExtensions,
) -> Pin<Box<dyn Future<Output = Result<(), Box<PluginError>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
One-time initialization, with the host services this plugin is
permitted to borrow. Read more
Source§fn as_audit_handler(self: Arc<Self>) -> Option<Arc<dyn AuditHandler>>
fn as_audit_handler(self: Arc<Self>) -> Option<Arc<dyn AuditHandler>>
If this plugin is also an audit sink, return it as one so the engine
attaches it to the executor’s verdict emit when the plugin is
registered, config-driven registration included. Read more
Auto Trait Implementations§
impl !Freeze for IsolatedPythonPlugin
impl !RefUnwindSafe for IsolatedPythonPlugin
impl !UnwindSafe for IsolatedPythonPlugin
impl Send for IsolatedPythonPlugin
impl Sync for IsolatedPythonPlugin
impl Unpin for IsolatedPythonPlugin
impl UnsafeUnpin for IsolatedPythonPlugin
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