pub struct PythonEnv {
pub root: PathBuf,
pub python: PathBuf,
pub source: PythonSource,
}Expand description
A Python environment (a venv).
Fields§
§root: PathBufThe environment’s folder (.venv).
python: PathBufIts interpreter.
source: PythonSourceWhere it comes from.
Implementations§
Source§impl PythonEnv
impl PythonEnv
Sourcepub fn find(scripts: Option<&Path>, default_root: &Path) -> Option<PythonEnv>
pub fn find(scripts: Option<&Path>, default_root: &Path) -> Option<PythonEnv>
The environment for scripts (a project’s scripts folder; None without a project), else
the active one, else the default one in default_root (when it was made).
Sourcepub fn command(&self) -> Command
pub fn command(&self) -> Command
A command running this environment’s Python (as an activated venv would: VIRTUAL_ENV
set, its bin first on the PATH).
Trait Implementations§
impl Eq for PythonEnv
impl StructuralPartialEq for PythonEnv
Auto Trait Implementations§
impl Forget for PythonEnv
impl Freeze for PythonEnv
impl Move for PythonEnv
impl RefUnwindSafe for PythonEnv
impl Send for PythonEnvwhere
RawVecInner: Send,
impl Sync for PythonEnvwhere
RawVecInner: Sync,
impl Unpin for PythonEnv
impl UnsafeUnpin for PythonEnv
impl UnwindSafe for PythonEnvwhere
RawVecInner: UnwindSafe,
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