Warn user that invoke_resumable is experimental

This commit is contained in:
Wei Tang 2018-07-09 23:34:57 +08:00
parent 0f0a28e9bd
commit 385aa3fbae
1 changed files with 6 additions and 2 deletions

View File

@ -155,16 +155,20 @@ impl FuncInstance {
}
}
/// Invoke the function, get a resumable handle. This handle can then be used to actually start the execution. If a
/// Host trap happens, caller can use `resume_execution` to feed the expected return value back in, and then
/// Invoke the function, get a resumable handle. This handle can then be used to [`start_execution`]. If a
/// Host trap happens, caller can use [`resume_execution`] to feed the expected return value back in, and then
/// continue the execution.
///
/// This is an experimental API, and this functionality may not be available in other WebAssembly engines.
///
/// # Errors
///
/// Returns `Err` if `args` types is not match function [`signature`].
///
/// [`signature`]: #method.signature
/// [`Trap`]: #enum.Trap.html
/// [`start_execution`]: struct.FuncInvocation.html#method.start_execution
/// [`resume_execution`]: struct.FuncInvocation.html#method.resume_execution
pub fn invoke_resumable<'args>(
func: &FuncRef,
args: &'args [RuntimeValue],