pub struct RantyOptions {
pub use_stdlib: bool,
pub debug_mode: bool,
pub top_level_defs_are_globals: bool,
pub seed: u64,
pub gc_allocation_threshold: usize,
}Expand description
Provides options for customizing the creation of a Ranty instance.
Fields§
§use_stdlib: boolSpecifies whether the standard library should be loaded.
debug_mode: boolEnables debug mode, which includes additional debug information in compiled programs and more detailed runtime error data.
top_level_defs_are_globals: boolPromotes definitions in a program’s root scope to globals instead of discarding them with the root frame.
This is primarily useful for REPL-style execution where each input should persist definitions for later inputs.
seed: u64The initial seed to pass to the RNG. Defaults to 0.
gc_allocation_threshold: usizeThe number of GC-managed allocations allowed between automatic cycle-collection passes.
Trait Implementations§
Source§impl Clone for RantyOptions
impl Clone for RantyOptions
Source§fn clone(&self) -> RantyOptions
fn clone(&self) -> RantyOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RantyOptions
impl Debug for RantyOptions
Auto Trait Implementations§
impl Freeze for RantyOptions
impl RefUnwindSafe for RantyOptions
impl Send for RantyOptions
impl Sync for RantyOptions
impl Unpin for RantyOptions
impl UnsafeUnpin for RantyOptions
impl UnwindSafe for RantyOptions
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