Struct erg_common::config::ErgConfig
source · pub struct ErgConfig {Show 18 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 transpile_target: Option<TranspileTarget>,
pub py_server_timeout: u64,
pub quiet_repl: bool,
pub show_type: bool,
pub input: Input,
pub output: Output,
pub dist_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>
§transpile_target: Option<TranspileTarget>
§py_server_timeout: u64
§quiet_repl: bool
§show_type: bool
§input: Input
§output: Output
§dist_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
impl ErgConfig
pub fn with_main_path(path: PathBuf) -> Self
pub fn string(src: String) -> Self
pub fn dump_path(&self) -> PathBuf
pub fn dump_filename(&self) -> String
pub fn dump_pyc_path(&self) -> PathBuf
pub fn dump_pyc_filename(&self) -> String
pub fn inherit(&self, path: PathBuf) -> Self
pub fn parse() -> Self
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ErgConfig
impl Send for ErgConfig
impl Sync for ErgConfig
impl Unpin for ErgConfig
impl UnwindSafe for ErgConfig
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