pub struct JsOptions {
pub memory_limit: usize,
pub max_stack_size: usize,
pub interrupt_limit: u64,
pub deterministic: bool,
}Expand description
Limits and behavior of a JsEvaluator.
Fields§
§memory_limit: usizeBytes the QuickJS heap of one runtime may use (default 32 MiB).
max_stack_size: usizeBytes of stack a call may use (default 512 KiB).
interrupt_limit: u64QuickJS interrupt checks a call may take, each after about 10 000 bytecode instructions (default 1000): past it the call fails.
deterministic: boolWhether Math.random(), Date.now() and new Date() throw
(default true), so code nodes cannot read randomness or a clock.
Trait Implementations§
Auto Trait Implementations§
impl Forget for JsOptions
impl Freeze for JsOptions
impl Move for JsOptions
impl RefUnwindSafe for JsOptions
impl Send for JsOptions
impl Sync for JsOptions
impl Unpin for JsOptions
impl UnsafeUnpin for JsOptions
impl UnwindSafe for JsOptions
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