pub struct LuaEnv { /* private fields */ }Expand description
Lexical local environment used by the Lua core eval policy.
Implementations§
Source§impl LuaEnv
impl LuaEnv
Sourcepub fn define(&mut self, name: Symbol, value: Value) -> Result<()>
pub fn define(&mut self, name: Symbol, value: Value) -> Result<()>
Bind a Lua local value in the current frame.
Sourcepub fn assign(&mut self, name: &Symbol, value: Value) -> Result<Value>
pub fn assign(&mut self, name: &Symbol, value: Value) -> Result<Value>
Assign an existing Lua local.
Sourcepub fn capture(&self, name: &Symbol) -> Result<BindingCell>
pub fn capture(&self, name: &Symbol) -> Result<BindingCell>
Capture an existing Lua local as a shared upvalue cell.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LuaEnv
impl RefUnwindSafe for LuaEnv
impl Send for LuaEnv
impl Sync for LuaEnv
impl Unpin for LuaEnv
impl UnsafeUnpin for LuaEnv
impl UnwindSafe for LuaEnv
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