(
&self,
mut store: impl AsContextMut<Data: Send>,
params: &[Val],
results: &mut [Val],
)
| 255 | /// Panics if `store` does not own this function. |
| 256 | #[cfg(feature = "async")] |
| 257 | pub async fn call_async( |
| 258 | &self, |
| 259 | mut store: impl AsContextMut<Data: Send>, |
| 260 | params: &[Val], |
| 261 | results: &mut [Val], |
| 262 | ) -> Result<()> { |
| 263 | let mut store = store.as_context_mut(); |
| 264 | |
| 265 | #[cfg(feature = "component-model-async")] |
| 266 | if store.0.concurrency_support() { |
| 267 | let call = self.start_call_concurrent(&mut store, params, results)?; |
| 268 | return store |
| 269 | .run_concurrent_trap_on_idle(async |store| { |
| 270 | self.finish_call_concurrent(store, call).await |
| 271 | }) |
| 272 | .await?; |
| 273 | } |
| 274 | |
| 275 | store |
| 276 | .on_fiber(|store| self.call_impl(store, params, results)) |
| 277 | .await? |
| 278 | } |
| 279 | |
| 280 | pub(crate) fn check_params_results<T>( |
| 281 | &self, |
nothing calls this directly
no test coverage detected