pub struct Context {
pub handle: *mut lua_State,
/* private fields */
}
Fields§
§handle: *mut lua_State
Implementations§
Source§impl Context
impl Context
pub fn new() -> Self
pub fn from_state(state: *mut lua_State) -> Self
pub fn from_state_weak(state: *mut lua_State) -> Self
pub fn eval(&mut self, code: &str) -> Result<(), &str>
pub fn get<'a, T>(&'a self, idx: &str) -> T
pub fn set<T>(&self, idx: &str, val: T)where
T: Push,
pub fn peek<'a, T>(&'a self, idx: i32) -> Twhere
T: Read<'a>,
pub fn push<T>(&self, val: T)where
T: Push,
pub fn pop<'a, T>(&'a self) -> T
pub fn pop_discard(&self, idx: i32)
pub fn remove<'a, T>(&'a self, idx: i32) -> T
pub fn remove_discard(&self, idx: i32)
pub fn size(&self) -> i32
pub fn dump(&self)
Trait Implementations§
impl Eq for Context
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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