pub struct LuaRuntime { /* private fields */ }Expand description
A Lua state with parser and standard libraries installed.
Implementations§
Source§impl LuaRuntime
impl LuaRuntime
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Create a Lua runtime with parser and standard libraries installed.
This installs no explicit host hooks. For a strict sandbox, construct
with LuaRuntime::with_hooks and audit the native compatibility
fallbacks in lua-stdlib.
Sourcepub fn with_hooks(hooks: HostHooks) -> Result<Self>
pub fn with_hooks(hooks: HostHooks) -> Result<Self>
Create a Lua runtime with the supplied host capabilities.
pub fn state(&self) -> &LuaState
pub fn state_mut(&mut self) -> &mut LuaState
pub fn into_state(self) -> LuaState
pub fn into_lua(self) -> Lua
Auto Trait Implementations§
impl Freeze for LuaRuntime
impl !RefUnwindSafe for LuaRuntime
impl !Send for LuaRuntime
impl !Sync for LuaRuntime
impl Unpin for LuaRuntime
impl UnsafeUnpin for LuaRuntime
impl !UnwindSafe for LuaRuntime
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