pub struct PyEnvs { /* private fields */ }Expand description
Every plugin environment of one engine.
Implementations§
Source§impl PyEnvs
impl PyEnvs
Sourcepub fn new(root: impl Into<PathBuf>, base: Vec<OsString>) -> Self
pub fn new(root: impl Into<PathBuf>, base: Vec<OsString>) -> Self
Environments go under root (e.g. <data>/plugin-python); base is the
interpreter they are made from (and the one plugins without requirements use).
Sourcepub fn with_uv(self, uv: Option<PathBuf>) -> Self
pub fn with_uv(self, uv: Option<PathBuf>) -> Self
Use this uv (None: pip only) instead of looking for one.
Sourcepub fn offline(self) -> Self
pub fn offline(self) -> Self
Install without a package index (local wheels and folders only; tests).
pub fn base(&self) -> &[OsString]
Sourcepub fn helper_dir(&self) -> Result<PathBuf, String>
pub fn helper_dir(&self) -> Result<PathBuf, String>
The folder holding byob_plugin.py, written there the first time it is asked for.
Sourcepub fn for_plugin(&self, requirements: &[String], dir: &Path) -> Arc<PyEnv> ⓘ
pub fn for_plugin(&self, requirements: &[String], dir: &Path) -> Arc<PyEnv> ⓘ
The environment for a plugin in dir that needs requirements (relative paths,
like ./wheels/x.whl, are taken from the plugin folder).
Sourcepub fn forget_failed(&self)
pub fn forget_failed(&self)
Forget failed builds so they are tried again (a reload).
Auto Trait Implementations§
impl !Freeze for PyEnvs
impl Forget for PyEnvs
impl Move for PyEnvs
impl RefUnwindSafe for PyEnvs
impl Send for PyEnvs
impl Sync for PyEnvs
impl Unpin for PyEnvs
impl UnsafeUnpin for PyEnvs
impl UnwindSafe for PyEnvs
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