Struct rlua::LuaFunction
[−]
[src]
pub struct LuaFunction<'lua>(_);
Handle to an internal Lua function.
Methods
impl<'lua> LuaFunction<'lua>
[src]
fn call<A: ToLuaMulti<'lua>, R: FromLuaMulti<'lua>>(
&self,
args: A
) -> LuaResult<R>
&self,
args: A
) -> LuaResult<R>
Calls the function, passing args
as function arguments.
The function's return values are converted to the generic type R
.
fn bind<A: ToLuaMulti<'lua>>(&self, args: A) -> LuaResult<LuaFunction<'lua>>
Returns a function that, when called with no arguments, calls self
, passing args
as
arguments.
This is equivalent to this Lua code:
function bind(f, ...)
return function() f(...) end
end
Trait Implementations
impl<'lua> Clone for LuaFunction<'lua>
[src]
fn clone(&self) -> LuaFunction<'lua>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'lua> Debug for LuaFunction<'lua>
[src]
impl<'lua> ToLua<'lua> for LuaFunction<'lua>
[src]
impl<'lua> FromLua<'lua> for LuaFunction<'lua>
[src]
fn from_lua(value: LuaValue<'lua>, _: &'lua Lua) -> LuaResult<LuaFunction<'lua>>
Performs the conversion.