pub trait ChunkExt<'lua, 'a> {
// Required methods
fn exec_async<'fut>(
self,
ctx: Context<'lua>,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'fut>>
where 'lua: 'fut;
fn call_async<'fut, Arg, Ret>(
self,
ctx: Context<'lua>,
args: Arg,
) -> Pin<Box<dyn Future<Output = Result<Ret>> + 'fut>>
where Arg: 'fut + ToLuaMulti<'lua>,
Ret: 'fut + FromLuaMulti<'lua>,
'lua: 'fut;
}
Expand description
Extension trait for rlua::Chunk
Note that there is currently no eval_async
function to match rlua::Chunk::eval
. This is
due to a missing function in the API of rlua::Chunk
. See also this pull
request.
Required Methods§
Sourcefn exec_async<'fut>(
self,
ctx: Context<'lua>,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'fut>>where
'lua: 'fut,
fn exec_async<'fut>(
self,
ctx: Context<'lua>,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'fut>>where
'lua: 'fut,
Asynchronously execute this chunk of code. See also rlua::Chunk::exec
.
Sourcefn call_async<'fut, Arg, Ret>(
self,
ctx: Context<'lua>,
args: Arg,
) -> Pin<Box<dyn Future<Output = Result<Ret>> + 'fut>>where
Arg: 'fut + ToLuaMulti<'lua>,
Ret: 'fut + FromLuaMulti<'lua>,
'lua: 'fut,
fn call_async<'fut, Arg, Ret>(
self,
ctx: Context<'lua>,
args: Arg,
) -> Pin<Box<dyn Future<Output = Result<Ret>> + 'fut>>where
Arg: 'fut + ToLuaMulti<'lua>,
Ret: 'fut + FromLuaMulti<'lua>,
'lua: 'fut,
Load the chunk function and call it with the given arguments. See also
rlua::Chunk::call
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.