[−][src]Trait rlua_async::FunctionExt
Extension trait for rlua::Function
Required methods
fn call_async<'fut, Arg, Ret>(
&self,
ctx: Context<'lua>,
args: Arg
) -> Pin<Box<dyn Future<Output = Result<Ret>> + 'fut>> where
'lua: 'fut,
Arg: 'fut + ToLuaMulti<'lua>,
Ret: 'fut + FromLuaMulti<'lua>,
&self,
ctx: Context<'lua>,
args: Arg
) -> Pin<Box<dyn Future<Output = Result<Ret>> + 'fut>> where
'lua: 'fut,
Arg: 'fut + ToLuaMulti<'lua>,
Ret: 'fut + FromLuaMulti<'lua>,
Calls the function in an async-compliant way.
By using this on the Rust side, you can recover as a Future
the potentiall
Poll::Pending
that might have been sent by eg. a downstream
ContextExt::create_async_function
Implementations on Foreign Types
impl<'lua> FunctionExt<'lua> for Function<'lua>
[src]
fn call_async<'fut, Arg, Ret>(
&self,
ctx: Context<'lua>,
args: Arg
) -> Pin<Box<dyn Future<Output = Result<Ret>> + 'fut>> where
'lua: 'fut,
Arg: 'fut + ToLuaMulti<'lua>,
Ret: 'fut + FromLuaMulti<'lua>,
[src]
&self,
ctx: Context<'lua>,
args: Arg
) -> Pin<Box<dyn Future<Output = Result<Ret>> + 'fut>> where
'lua: 'fut,
Arg: 'fut + ToLuaMulti<'lua>,
Ret: 'fut + FromLuaMulti<'lua>,