MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / call

Method call

tests/all/component_model.rs:63–82  ·  view source on GitHub ↗
(
        self,
        store: &mut Store<T>,
        func: TypedFunc<P, R>,
        params: P,
    )

Source from the content-addressed store, hash-verified

61 }
62
63 async fn call<
64 P: ComponentNamedList + Lower + 'static,
65 R: ComponentNamedList + Lift + 'static,
66 T: Send,
67 >(
68 self,
69 store: &mut Store<T>,
70 func: TypedFunc<P, R>,
71 params: P,
72 ) -> Result<R> {
73 match self {
74 ApiStyle::Sync => func.call(&mut *store, params),
75 ApiStyle::Async | ApiStyle::AsyncNotConcurrent => {
76 func.call_async(&mut *store, params).await
77 }
78 ApiStyle::Concurrent => Ok(store
79 .run_concurrent(async |access| func.call_concurrent(access, params).await)
80 .await??),
81 }
82 }
83
84 async fn resource_drop<T: Send>(
85 self,

Callers 15

no_host_trap_handlersFunction · 0.45
loops_interruptibleFunction · 0.45
functions_interruptibleFunction · 0.45
loop_interrupt_from_afarFunction · 0.45
test_trap_returnFunction · 0.45
test_trap_traceFunction · 0.45
test_trap_through_hostFunction · 0.45

Calls 4

OkFunction · 0.85
run_concurrentMethod · 0.80
call_concurrentMethod · 0.80
call_asyncMethod · 0.45

Tested by 15

loops_interruptibleFunction · 0.36
functions_interruptibleFunction · 0.36
loop_interrupt_from_afarFunction · 0.36
test_trap_returnFunction · 0.36
test_trap_traceFunction · 0.36
test_trap_through_hostFunction · 0.36
test_trap_trace_cbFunction · 0.36