Function quickjs_runtime::quickjs_utils::promises::new_promise
source · pub unsafe fn new_promise(
context: *mut JSContext,
) -> Result<QuickJsPromiseAdapter, JsError>
Expand description
create a new Promise you can use this to respond asynchronously to method calls from JavaScript by returning a Promise
§Safety
When passing a context pointer please make sure the corresponding QuickJsContext is still valid