pub struct LuaSandboxBuilder { /* private fields */ }Expand description
Sandbox builder that finalizes to a Lua (instead of a bare Vm).
Implementations§
Source§impl LuaSandboxBuilder
impl LuaSandboxBuilder
Sourcepub fn open_string(self) -> Self
pub fn open_string(self) -> Self
Whitelist the string standard library.
Sourcepub fn open_table(self) -> Self
pub fn open_table(self) -> Self
Whitelist the table standard library.
Sourcepub fn open_coroutine(self) -> Self
pub fn open_coroutine(self) -> Self
Whitelist the coroutine standard library.
Sourcepub fn with_instr_budget(self, n: i64) -> Self
pub fn with_instr_budget(self, n: i64) -> Self
Cap interpreter instruction count per call (fires once, then trips).
Sourcepub fn with_memory_cap(self, n: usize) -> Self
pub fn with_memory_cap(self, n: usize) -> Self
Cap heap memory (approximate; see crate::vm::Vm::set_memory_cap).
Sourcepub fn allow_bytecode_loading(self) -> Self
pub fn allow_bytecode_loading(self) -> Self
Re-enable precompiled-bytecode loading (off by default in sandbox mode for safety).
Auto Trait Implementations§
impl Freeze for LuaSandboxBuilder
impl RefUnwindSafe for LuaSandboxBuilder
impl Send for LuaSandboxBuilder
impl Sync for LuaSandboxBuilder
impl Unpin for LuaSandboxBuilder
impl UnsafeUnpin for LuaSandboxBuilder
impl UnwindSafe for LuaSandboxBuilder
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