async fn internal_run_async<N, A, T>(
    context: &Arc<runestick::Context>,
    sources: &mut Sources,
    function: N,
    args: A,
) -> Result<T, RunError>
where
    N: IntoIterator,
    N::Item: IntoComponent,
    A: runestick::Args,
    T: FromValue,
{
    let vm = vm(context, sources)?;

    let output = vm
        .execute(&Item::with_item(function), args)
        .map_err(RunError::VmError)?
        .async_complete()
        .await
        .map_err(RunError::VmError)?;

    T::from_value(output).map_err(RunError::VmError)
}
/// Call the specified function in the given script.
Call the specified function in the given script.
Call the specified function in the given script .
async fn internal_run_async<N, A, T>(
    context: &Arc<runestick::Context>,
    sources: &mut Sources,
    function: N,
    args: A,
) -> Result<T, RunError>
where
    N: IntoIterator,
    N::Item: IntoComponent,
    A: runestick::Args,
    T: FromValue,
{
    let vm = vm(context, sources)?;
    let output = vm
        .execute(&Item::with_item(function), args)
        .map_err(RunError::VmError)?
        .async_complete()
        .await
        .map_err(RunError::VmError)?;
    T::from_value(output).map_err(RunError::VmError)
}
async fn internal_run_async < N , A , T > ( context : & Arc < runestick :: Context > , sources : & mut Sources , function : N , args : A , ) -> Result < T , RunError > where N : IntoIterator , N :: Item : IntoComponent , A : runestick :: Args , T : FromValue , { let vm = vm ( context , sources ) ? ; let output = vm . execute ( & Item :: with_item ( function ) , args ) . map_err ( RunError :: VmError ) ? . async_complete ( ) . await . map_err ( RunError :: VmError ) ? ; T :: from_value ( output ) . map_err ( RunError :: VmError ) }
Call the specified function in the given script.
Call the specified function in the given script .
context
&Arc<runestick::Context>
sources
&mut Sources
function
N
args
A
context
&Arc<runestick::Context>
sources
&mut Sources
function
N
args
A