pub struct State(/* private fields */);Implementations§
Source§impl State
impl State
pub fn type_of(&self, index: i32) -> i32
pub fn type_name(&self, idx: i32) -> String
pub fn globals(&self) -> Table
pub fn set_global(&self, key: impl ToLua, value: impl ToLua) -> Result<()>
pub fn get_global<V: FromLua>(&self, key: impl ToLua) -> Result<V>
pub fn caller_source_path(&self) -> Option<PathBuf>
pub fn load_buffer(&self, buff: &[u8], name: &CStr) -> Result<Function>
pub fn dump_stack(&self)
Source§impl State
impl State
pub fn error_no_halt(&self, err: &str)
pub fn error_no_halt_with_stack(&self, err: &str)
Source§impl State
impl State
pub fn stack_guard(&self) -> StackGuard
Source§impl State
impl State
pub fn create_table(&self) -> Table
pub fn create_table_with_capacity(&self, narr: i32, nrec: i32) -> Table
Source§impl State
impl State
pub fn create_function<F, Marker>(&self, func: F) -> Functionwhere
F: IntoLuaFunction<Marker>,
Source§impl State
impl State
pub fn create_userdata<T: UserData>(&self, ud: T) -> UserDataRef<T>
Trait Implementations§
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl UnwindSafe for State
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