[−][src]Struct pm_rlua::Lua
Implementations
impl Lua
[src]
pub fn new() -> Lua
[src]
Builds a new Lua context.
Panic
The function panics if the underlying call to luaL_newstate
fails
(which indicates lack of memory).
pub fn state(&mut self) -> *mut lua_State
[src]
pub fn clone(&mut self) -> Lua
[src]
pub fn set_own(&mut self, own: bool)
[src]
pub fn from_existing_state(lua: *mut lua_State, close_at_the_end: bool) -> Lua
[src]
Takes an existing lua_State
and build a Lua object from it.
Arguments
close_at_the_end
: if true, lua_close will be called on the lua_State on the destructor
pub fn register<I>(
&mut self,
index: I,
func: extern "C" fn(_: *mut lua_State) -> c_int
) -> i32 where
I: Borrow<str>,
[src]
&mut self,
index: I,
func: extern "C" fn(_: *mut lua_State) -> c_int
) -> i32 where
I: Borrow<str>,
pub fn openlibs(&mut self)
[src]
Opens all standard Lua libraries.
This is done by calling luaL_openlibs
.
pub fn query<V, I>(&mut self, index: I) -> Option<V> where
I: Borrow<str>,
V: LuaRead,
[src]
I: Borrow<str>,
V: LuaRead,
Reads the value of a global variable.
pub fn set<I, V>(&mut self, index: I, value: V) where
I: Borrow<str>,
V: LuaPush,
[src]
I: Borrow<str>,
V: LuaPush,
Modifies the value of a global variable.
pub fn exec_string<I, R>(&mut self, index: I) -> Option<R> where
I: Borrow<str>,
R: LuaRead,
[src]
I: Borrow<str>,
R: LuaRead,
pub fn exec_func<I, R>(&mut self, index: I) -> Option<R> where
I: Borrow<str>,
R: LuaRead,
[src]
I: Borrow<str>,
R: LuaRead,
pub fn empty_table<I>(&mut self, index: I) -> LuaTable where
I: Borrow<str>,
[src]
I: Borrow<str>,
Inserts an empty table, then loads it.
pub fn add_lualoader(
&mut self,
func: extern "C" fn(_: *mut lua_State) -> c_int
) -> i32
[src]
&mut self,
func: extern "C" fn(_: *mut lua_State) -> c_int
) -> i32
pub fn load_file(&mut self, file_name: &str) -> i32
[src]
pub fn enable_hotfix(&mut self)
[src]
enable hotfix, can update the new func, and the old data will be keep and bind to the new func
pub fn exec_gc(&mut self) -> i32
[src]
pub fn exec_func0<Z>(&mut self, func_name: Z) -> i32 where
Z: Borrow<str>,
[src]
Z: Borrow<str>,
pub fn exec_func1<Z, A>(&mut self, func_name: Z, A: A) -> i32 where
Z: Borrow<str>,
A: LuaPush,
[src]
Z: Borrow<str>,
A: LuaPush,
pub fn exec_func2<Z, A, B>(&mut self, func_name: Z, A: A, B: B) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
[src]
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
pub fn exec_func3<Z, A, B, C>(&mut self, func_name: Z, A: A, B: B, C: C) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
[src]
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
pub fn exec_func4<Z, A, B, C, D>(
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
[src]
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
pub fn exec_func5<Z, A, B, C, D, E>(
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
[src]
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
pub fn exec_func6<Z, A, B, C, D, E, F>(
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
F: LuaPush,
[src]
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
F: LuaPush,
pub fn exec_func7<Z, A, B, C, D, E, F, G>(
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
F: LuaPush,
G: LuaPush,
[src]
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
F: LuaPush,
G: LuaPush,
pub fn exec_func8<Z, A, B, C, D, E, F, G, H>(
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G,
H: H
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
F: LuaPush,
G: LuaPush,
H: LuaPush,
[src]
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G,
H: H
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
F: LuaPush,
G: LuaPush,
H: LuaPush,
pub fn exec_func9<Z, A, B, C, D, E, F, G, H, I>(
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G,
H: H,
I: I
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
F: LuaPush,
G: LuaPush,
H: LuaPush,
I: LuaPush,
[src]
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G,
H: H,
I: I
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
F: LuaPush,
G: LuaPush,
H: LuaPush,
I: LuaPush,
pub fn exec_func10<Z, A, B, C, D, E, F, G, H, I, J>(
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G,
H: H,
I: I,
J: J
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
F: LuaPush,
G: LuaPush,
H: LuaPush,
I: LuaPush,
J: LuaPush,
[src]
&mut self,
func_name: Z,
A: A,
B: B,
C: C,
D: D,
E: E,
F: F,
G: G,
H: H,
I: I,
J: J
) -> i32 where
Z: Borrow<str>,
A: LuaPush,
B: LuaPush,
C: LuaPush,
D: LuaPush,
E: LuaPush,
F: LuaPush,
G: LuaPush,
H: LuaPush,
I: LuaPush,
J: LuaPush,
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Lua
impl !Send for Lua
impl !Sync for Lua
impl Unpin for Lua
impl UnwindSafe for Lua
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,