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 manager 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
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