#[non_exhaustive]pub struct Settings {Show 32 fields
pub isolated: bool,
pub dev_mode: bool,
pub install_signal_handlers: bool,
pub hash_seed: Option<u32>,
pub faulthandler: bool,
pub code_debug_ranges: bool,
pub argv: Vec<String>,
pub xoptions: Vec<(String, Option<String>)>,
pub warnoptions: Vec<String>,
pub import_site: bool,
pub bytes_warning: u64,
pub warn_default_encoding: bool,
pub thread_inherit_context: bool,
pub context_aware_warnings: bool,
pub inspect: bool,
pub interactive: bool,
pub write_bytecode: bool,
pub verbose: u8,
pub quiet: bool,
pub user_site_directory: bool,
pub buffered_stdio: bool,
pub stdio_encoding: Option<String>,
pub stdio_errors: Option<String>,
pub utf8_mode: i8,
pub check_hash_pycs_mode: CheckHashPycsMode,
pub safe_path: bool,
pub int_max_str_digits: i64,
pub path_list: Vec<String>,
pub debug: u8,
pub optimize: u8,
pub ignore_environment: bool,
pub allow_external_library: bool,
}Expand description
User-configurable settings for the python vm.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.isolated: bool-I
dev_mode: bool-Xdev
install_signal_handlers: boolNot set SIGINT handler(i.e. for embedded mode)
hash_seed: Option<u32>PYTHONHASHSEED=x None means use_hash_seed = 0 in CPython
faulthandler: bool-X faulthandler, PYTHONFAULTHANDLER
code_debug_ranges: bool-X no_debug_ranges: disable column info in bytecode
argv: Vec<String>sys.argv
xoptions: Vec<(String, Option<String>)>-Xfoo[=bar]
warnoptions: Vec<String>-Wfoo
import_site: bool-S
bytes_warning: u64-b
warn_default_encoding: bool-X warn_default_encoding, PYTHONWARNDEFAULTENCODING
thread_inherit_context: bool-X thread_inherit_context, whether new threads inherit context from parent
context_aware_warnings: bool-X context_aware_warnings, whether warnings are context aware
inspect: bool-i
interactive: bool-i, with no script
write_bytecode: bool-B
verbose: u8verbosity level (-v switch)
quiet: bool-q
user_site_directory: bool-s
buffered_stdio: bool-u, PYTHONUNBUFFERED=x
stdio_encoding: Option<String>PYTHONIOENCODING - stdio encoding
stdio_errors: Option<String>PYTHONIOENCODING - stdio error handler
utf8_mode: i8§check_hash_pycs_mode: CheckHashPycsMode–check-hash-based-pycs
safe_path: bool-P
int_max_str_digits: i64-X int_max_str_digits
path_list: Vec<String>Environment PYTHONPATH (and RUSTPYTHONPATH)
debug: u8-d command line switch
optimize: u8-O optimization switch counter
ignore_environment: bool-E
allow_external_library: boolfalse for wasm. Not a command-line option
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more