MCPcopy Create free account
hub / github.com/ZettaScaleLabs/hiroz / encode_reply

Function encode_reply

crates/hiroz/src/lifecycle/node.rs:407–421  ·  view source on GitHub ↗
(
    query: &Query,
    resp: &T,
)

Source from the content-addressed store, hash-verified

405 )
406 .build_with_callback(move |query| {
407 let Some(_): Option<GetAvailableTransitionsRequest> = decode_request(&query) else {
408 return;
409 };
410 let available_transitions = sm_gat
411 .lock()
412 .unwrap()
413 .available_transitions()
414 .into_iter()
415 .map(|(t, s, g)| to_lc_td(t, s, g))
416 .collect();
417 encode_reply(
418 &query,
419 &GetAvailableTransitionsResponse {
420 available_transitions,
421 },
422 );
423 })?;
424

Callers 1

buildMethod · 0.85

Calls 3

replyMethod · 0.80
waitMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected