pub struct ErgConfig {
Show 16 fields pub mode: ErgMode, pub opt_level: u8, pub no_std: bool, pub py_magic_num: Option<u32>, pub py_command: Option<&'static str>, pub target_version: Option<PythonVersion>, pub py_server_timeout: u64, pub quiet_repl: bool, pub show_type: bool, pub input: Input, pub output_dir: Option<&'static str>, pub module: &'static str, pub verbose: u8, pub ps1: &'static str, pub ps2: &'static str, pub runtime_args: Vec<&'static str>,
}

Fields§

§mode: ErgMode§opt_level: u8

optimization level.

  • 0: no optimization
  • 1 (default): e.g. constant folding, dead code elimination
  • 2: e.g. static dispatching, inlining, peephole
  • 3: e.g. JIT compiling
§no_std: bool§py_magic_num: Option<u32>§py_command: Option<&'static str>§target_version: Option<PythonVersion>§py_server_timeout: u64§quiet_repl: bool§show_type: bool§input: Input§output_dir: Option<&'static str>§module: &'static str

module name to be executed

§verbose: u8

verbosity level for system messages.

  • 0: display errors, warns
  • 1 (default): display errors, warnings and hints
§ps1: &'static str

needed for jupyter-erg

§ps2: &'static str§runtime_args: Vec<&'static str>

Implementations§

source§

impl ErgConfig

source

pub fn with_main_path(path: PathBuf) -> Self

source

pub fn copy(&self) -> Self

clone alias (since the actual clone cost is low)

source

pub fn dump_path(&self) -> PathBuf

source

pub fn dump_filename(&self) -> String

source

pub fn dump_pyc_path(&self) -> PathBuf

source

pub fn dump_pyc_filename(&self) -> String

source

pub fn inherit(&self, path: PathBuf) -> Self

source

pub fn parse() -> Self

Trait Implementations§

source§

impl Clone for ErgConfig

source§

fn clone(&self) -> ErgConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ErgConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ErgConfig

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.