MCPcopy Create free account
hub / github.com/Moosync/Moosync / send_reply

Function send_reply

src/app.rs:314–323  ·  view source on GitHub ↗
(payload: ExtensionUIRequest, data: T)

Source from the content-addressed store, hash-verified

312
313 #[tracing::instrument(level = "debug", skip(payload, data))]
314 fn send_reply<T>(payload: ExtensionUIRequest, data: T)
315 where
316 T: Serialize + Clone,
317 {
318 let value = serde_wasm_bindgen::to_value(&data).unwrap();
319 spawn_local(async move {
320 let res = emit(format!("ui-reply-{}", payload.channel).as_str(), value);
321 wasm_bindgen_futures::JsFuture::from(res).await.unwrap();
322 });
323 }
324
325 match payload.type_.as_str() {
326 "getCurrentSong" => {

Callers 1

AppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected