#[non_exhaustive]pub struct Settings {Show 26 fields
pub isolated: bool,
pub dev_mode: bool,
pub install_signal_handlers: bool,
pub hash_seed: Option<u32>,
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 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 utf8_mode: u8,
pub check_hash_pycs_mode: String,
pub safe_path: bool,
pub int_max_str_digits: i64,
pub path_list: Vec<String>,
pub debug: bool,
pub optimize: u8,
pub ignore_environment: bool,
pub allow_external_library: bool,
}
Expand description
Struct containing all kind of settings for the python vm.
Mostly PyConfig
in CPython.
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.isolated: bool
-I
dev_mode: bool
-Xdev
install_signal_handlers: bool
Not set SIGINT handler(i.e. for embedded mode)
hash_seed: Option<u32>
PYTHONHASHSEED=x None means use_hash_seed = 0 in CPython
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
inspect: bool
-i
interactive: bool
-i, with no script
write_bytecode: bool
-B
verbose: u8
verbosity level (-v switch)
quiet: bool
-q
user_site_directory: bool
-s
buffered_stdio: bool
-u, PYTHONUNBUFFERED=x
utf8_mode: u8
§check_hash_pycs_mode: String
–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: bool
-d command line switch
optimize: u8
-O optimization switch counter
ignore_environment: bool
-E
allow_external_library: bool
false 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 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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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