[][src]Enum python_packaging::interpreter::PythonRunMode

pub enum PythonRunMode {
    None,
    Repl,
    Module {
        module: String,
    },
    Eval {
        code: String,
    },
    File {
        path: PathBuf,
    },
}

Defines Python code to run.

Variants

None

No-op.

Repl

Run a Python REPL.

Module

Run a Python module as the main module.

Fields of Module

module: String
Eval

Evaluate Python code from a string.

Fields of Eval

code: String
File

Execute Python code in a file.

We define this as a CString because the underlying API wants a char* and we want the constructor of this type to worry about the type coercion.

Fields of File

path: PathBuf

Trait Implementations

impl Clone for PythonRunMode[src]

impl Debug for PythonRunMode[src]

impl PartialEq<PythonRunMode> for PythonRunMode[src]

impl StructuralPartialEq for PythonRunMode[src]

impl ToString for PythonRunMode[src]

impl<'_> TryFrom<&'_ str> for PythonRunMode[src]

type Error = String

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.