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

Function require_async_with_debug_handler

tests/all/missing_async.rs:131–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129
130#[test]
131fn require_async_with_debug_handler() -> Result<()> {
132 let mut config = Config::new();
133 config.guest_debug(true);
134 let engine = Engine::new(&config)?;
135 let mut store = Store::new(&engine, ());
136 store.set_debug_handler(MyDebugHandler);
137 assert_requires_async(&mut store);
138 return Ok(());
139
140 #[derive(Clone)]
141 struct MyDebugHandler;
142
143 impl DebugHandler for MyDebugHandler {
144 type Data = ();
145
146 async fn handle(&self, _: StoreContextMut<'_, ()>, _: DebugEvent<'_>) {}
147 }
148}
149
150struct MyAsyncCallHook;
151

Callers

nothing calls this directly

Calls 5

OkFunction · 0.85
guest_debugMethod · 0.80
set_debug_handlerMethod · 0.80
assert_requires_asyncFunction · 0.70
newFunction · 0.50

Tested by

no test coverage detected