pub struct PluginPython {
pub envs: Arc<PyEnvs>,
pub env: Option<Arc<PyEnv>>,
}Expand description
One plugin’s Python: byob’s helper, and its own environment if it has requirements.
Fields§
§envs: Arc<PyEnvs>§env: Option<Arc<PyEnv>>Implementations§
Source§impl PluginPython
impl PluginPython
Sourcepub fn new(envs: &Arc<PyEnvs>, requirements: &[String], dir: &Path) -> Self
pub fn new(envs: &Arc<PyEnvs>, requirements: &[String], dir: &Path) -> Self
For a plugin in dir with these requirements.
Sourcepub fn python(&self) -> Result<Python, String>
pub fn python(&self) -> Result<Python, String>
See PyEnvs::python (may build the environment: not on the engine thread).
Sourcepub fn python_until(
&self,
cancelled: &dyn Fn() -> bool,
) -> Result<Python, String>
pub fn python_until( &self, cancelled: &dyn Fn() -> bool, ) -> Result<Python, String>
Self::python whose build gives up once cancelled().
Trait Implementations§
Auto Trait Implementations§
impl Forget for PluginPython
impl Freeze for PluginPython
impl Move for PluginPython
impl RefUnwindSafe for PluginPython
impl Send for PluginPython
impl Sync for PluginPython
impl Unpin for PluginPython
impl UnsafeUnpin for PluginPython
impl UnwindSafe for PluginPython
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