(
self,
store: &mut Store<T>,
linker: &Linker<T>,
component: &Component,
)
| 47 | } |
| 48 | |
| 49 | async fn instantiate<T: Send>( |
| 50 | self, |
| 51 | store: &mut Store<T>, |
| 52 | linker: &Linker<T>, |
| 53 | component: &Component, |
| 54 | ) -> Result<Instance> { |
| 55 | match self { |
| 56 | ApiStyle::Sync => linker.instantiate(store, &component), |
| 57 | ApiStyle::Async | ApiStyle::AsyncNotConcurrent | ApiStyle::Concurrent => { |
| 58 | linker.instantiate_async(store, &component).await |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | async fn call< |
| 64 | P: ComponentNamedList + Lower + 'static, |