pub trait FunctionExt<'lua> {
    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>
; }
Expand description

Extension trait for rlua::Function

Required methods

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

Implementors