Struct rustpython_vm::vm::Settings

source ·
#[non_exhaustive]
pub struct Settings {
Show 26 fields pub debug: bool, pub inspect: bool, pub interactive: bool, pub optimize: u8, pub no_sig_int: bool, pub no_user_site: bool, pub no_site: bool, pub ignore_environment: bool, pub verbose: u8, pub quiet: bool, pub dont_write_bytecode: bool, pub safe_path: bool, pub bytes_warning: u64, pub xopts: Vec<(String, Option<String>)>, pub int_max_str_digits: i64, pub isolated: bool, pub dev_mode: bool, pub warn_default_encoding: bool, pub warnopts: Vec<String>, pub path_list: Vec<String>, pub argv: Vec<String>, pub hash_seed: Option<u32>, pub stdio_unbuffered: bool, pub check_hash_based_pycs: String, pub allow_external_library: bool, pub utf8_mode: u8,
}
Expand description

Struct containing all kind of settings for the python vm.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§debug: bool

-d command line switch

§inspect: bool

-i

§interactive: bool

-i, with no script

§optimize: u8

-O optimization switch counter

§no_sig_int: bool

Not set SIGINT handler(i.e. for embedded mode)

§no_user_site: bool

-s

§no_site: bool

-S

§ignore_environment: bool

-E

§verbose: u8

verbosity level (-v switch)

§quiet: bool

-q

§dont_write_bytecode: bool

-B

§safe_path: bool

-P

§bytes_warning: u64

-b

§xopts: Vec<(String, Option<String>)>

-Xfoo[=bar]

§int_max_str_digits: i64

-X int_max_str_digits

§isolated: bool

-I

§dev_mode: bool

-Xdev

§warn_default_encoding: bool

-X warn_default_encoding, PYTHONWARNDEFAULTENCODING

§warnopts: Vec<String>

-Wfoo

§path_list: Vec<String>

Environment PYTHONPATH and RUSTPYTHONPATH:

§argv: Vec<String>

sys.argv

§hash_seed: Option<u32>

PYTHONHASHSEED=x

§stdio_unbuffered: bool

-u, PYTHONUNBUFFERED=x

§check_hash_based_pycs: String

–check-hash-based-pycs

§allow_external_library: bool

false for wasm. Not a command-line option

§utf8_mode: u8

Implementations§

source§

impl Settings

source

pub fn with_path(self, path: String) -> Self

Trait Implementations§

source§

impl Default for Settings

Sensible default settings.

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,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<T, U> ExactFrom<T> for Uwhere U: TryFrom<T>,

§

fn exact_from(value: T) -> U

§

impl<T, U> ExactInto<U> for Twhere U: ExactFrom<T>,

§

fn exact_into(self) -> U

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

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.

§

impl<T, U> OverflowingInto<U> for Twhere U: OverflowingFrom<T>,

§

fn overflowing_into(self) -> (U, bool)

§

impl<T, U> RoundingInto<U> for Twhere U: RoundingFrom<T>,

§

fn rounding_into(self, rm: RoundingMode) -> U

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T, U> SaturatingInto<U> for Twhere U: SaturatingFrom<T>,

§

fn saturating_into(self) -> U

source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
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.
source§

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

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T, U> WrappingInto<U> for Twhere U: WrappingFrom<T>,

§

fn wrapping_into(self) -> U

source§

impl<T> PyThreadingConstraint for T