pub struct VmLimits {
pub memory_limit_bytes: usize,
pub max_stack_bytes: usize,
}Expand description
Resource limits applied to the QuickJS runtime before any script runs.
There is deliberately no wall-clock timeout here: cancellation (dropping the run future, or the driver’s cancel cascade) is the deadline mechanism.
Fields§
§memory_limit_bytes: usizeQuickJS heap ceiling in bytes (default 32 MiB).
max_stack_bytes: usizeMaximum interpreter stack in bytes (default 1 MiB).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VmLimits
impl RefUnwindSafe for VmLimits
impl Send for VmLimits
impl Sync for VmLimits
impl Unpin for VmLimits
impl UnsafeUnpin for VmLimits
impl UnwindSafe for VmLimits
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