MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / call

Function call

libatomic/tests/review_workflow_service_test.rs:136–146  ·  view source on GitHub ↗
(
    service: &LocalService,
    group: &str,
    method: &str,
    input: &I,
)

Source from the content-addressed store, hash-verified

134// Keep the real transport status for code/details assertions in this byte client.
135#[allow(clippy::result_large_err)]
136async fn call<I: Message, O: Message + Default>(
137 service: &LocalService,
138 group: &str,
139 method: &str,
140 input: &I,
141) -> Result<O, Status> {
142 let bytes = service
143 .call(&format!("/atomic.{group}/{method}"), &input.encode_to_vec())
144 .await?;
145 O::decode(bytes.as_slice()).map_err(|error| Status::internal(error.to_string()))
146}
147
148async fn prepare(
149 service: &LocalService,

Calls 3

decodeFunction · 0.50
callMethod · 0.45
as_sliceMethod · 0.45

Tested by

no test coverage detected