pub struct PythonEnv { /* private fields */ }Available on crate feature
std only.Implementations§
Source§impl PythonEnv
impl PythonEnv
pub fn system() -> Self
pub fn at(path: PathBuf) -> Self
pub fn python(&self) -> Command
pub fn pip(&self) -> Command
pub fn pip_command(&self, subcommand: &str, verbosity: u8) -> Command
Sourcepub fn pip_verbosity(verbosity: u8) -> Vec<&'static str>
pub fn pip_verbosity(verbosity: u8) -> Vec<&'static str>
Returns the verbosity flags for pip from a normalized level.
pub fn packages_dir(&self) -> Result<ReadDir>
pub fn packages_path(&self) -> Option<PathBuf>
pub fn lib_path(&self) -> Option<PathBuf>
Trait Implementations§
Source§impl Env for PythonEnv
impl Env for PythonEnv
fn path(&self) -> Option<&PathBuf>
fn is_initialized(&self) -> bool
fn initialize(&self) -> Result<()>
fn available_modules(&self) -> Result<Vec<String>>
fn installed_modules(&self) -> Result<Vec<String>>
fn install_module( &self, module_name: impl ToString, verbosity: Option<u8>, ) -> Result<ExitStatus>
fn uninstall_module( &self, module_name: impl ToString, verbosity: Option<u8>, ) -> Result<ExitStatus>
fn is_module_available(&self, module_name: impl ToString) -> Result<bool>
fn is_module_installed(&self, module_name: impl ToString) -> Result<bool>
fn is_module_enabled(&self, _module_name: impl ToString) -> Result<bool>
Auto Trait Implementations§
impl Freeze for PythonEnv
impl RefUnwindSafe for PythonEnv
impl Send for PythonEnv
impl Sync for PythonEnv
impl Unpin for PythonEnv
impl UnsafeUnpin for PythonEnv
impl UnwindSafe for PythonEnv
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