pub struct Settings { /* private fields */ }Expand description
An immutable description of a builder’s or interpreter’s configuration.
Read this through crate::RustiaBuilder::settings before construction or
crate::Rustia::settings afterward. Configure the interpreter through its
builder.
identity_bytes also covers internal settings that
applications cannot configure. It is useful when binding a replay or a
script package to an exact configuration.
Implementations§
Source§impl Settings
impl Settings
Sourcepub const fn profile(&self) -> Profile
pub const fn profile(&self) -> Profile
Returns the selected language compatibility and host capability policy.
Sourcepub const fn guest_surface(&self) -> GuestSurface
pub const fn guest_surface(&self) -> GuestSurface
Returns the script environment selected by the execution preset.
Sourcepub const fn fuel(&self) -> Option<u64>
pub const fn fuel(&self) -> Option<u64>
Returns the instruction-fuel ceiling, or None when unlimited.
Sourcepub const fn recursion_limit(&self) -> usize
pub const fn recursion_limit(&self) -> usize
Returns the maximum script call depth.
Sourcepub const fn memory_limit_bytes(&self) -> Option<usize>
pub const fn memory_limit_bytes(&self) -> Option<usize>
Returns the logical-live script memory limit, or None when unlimited.
Sourcepub const fn memory_tracking(&self) -> bool
pub const fn memory_tracking(&self) -> bool
Returns whether instruction-boundary memory peaks are recorded.
Sourcepub const fn diagnostic_limits(&self) -> DiagnosticLimits
pub const fn diagnostic_limits(&self) -> DiagnosticLimits
Returns the separate host-side error reporting budgets.
Sourcepub const fn runtime_compilation(&self) -> bool
pub const fn runtime_compilation(&self) -> bool
Returns whether scripts may compile more code through loadstring.
Sourcepub const fn wall_clock(&self) -> Option<ServiceDeterminism>
pub const fn wall_clock(&self) -> Option<ServiceDeterminism>
Returns the wall-clock provider’s declaration, or None for the default.
Sourcepub const fn monotonic_clock(&self) -> Option<ServiceDeterminism>
pub const fn monotonic_clock(&self) -> Option<ServiceDeterminism>
Returns the monotonic-clock declaration, or None for the logical clock.
Sourcepub const fn entropy(&self) -> Option<ServiceDeterminism>
pub const fn entropy(&self) -> Option<ServiceDeterminism>
Returns the seed provider’s declaration, or None for the zero seed.
Sourcepub const fn module_resolver(&self) -> Option<ServiceDeterminism>
pub const fn module_resolver(&self) -> Option<ServiceDeterminism>
Returns the module resolver’s declaration, or None when absent.
Sourcepub fn identity_bytes(&self) -> &[u8] ⓘ
pub fn identity_bytes(&self) -> &[u8] ⓘ
Returns canonical, versioned bytes describing the effective settings.
The bytes cover the profile, guest surface, every resource and reporting limit, internal execution options, runtime-compiler presence, and host provider presence and reproducibility declarations. Integers have fixed widths and little-endian encoding, independent of the machine’s pointer width. Treat the result as opaque; a new encoding version may change it.
This does not identify source code, the Rustia build, callback or provider implementations, captured data, resolved modules, or returned clock and entropy values. Bind those separately when constructing a replay or package identity. Reading these bytes never calls a host provider.