Enum pyenv_python::Python[][src]

pub enum Python {
    Pyenv(Pyenv),
    System(PythonExecutable),
}
Expand description

A python executable, either a pyenv one or the system python (i.e. whatever else is in $PATH).

Variants

Pyenv(Pyenv)

Implementations

Lookup the current system python, i.e., whatever next is in $PATH that’s not the current executable or a pyenv shim.

Pass a PyenvRoot to avoid pyenv shims. If there is no pyenv root than None will work.

Specifically, this returns the next python on $PATH, excluding the current executable and $PYENV_ROOT/shims/python. Otherwise, an infinite loop would be formed between ourselves and $PYENV_ROOT/shims/python.

See SystemPythonError for possible errors.

Lookup a python executable.

If a pyenv python cannot be found (see Pyenv::new), try finding the system python (see Python::system). If neither can be found, return the errors for both in PythonError.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Apply a function to this value and return the (possibly) modified value.

Gets the TypeId of self. Read more

Apply a function which takes the parameter by value.

Apply a function which takes the parameter by reference.

Apply a function which takes the parameter by mutable reference.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.