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

Function invoke

libatomic/tests/local_sync_test.rs:213–223  ·  view source on GitHub ↗
(
    service: &LocalService,
    method: &str,
    request: &Req,
)

Source from the content-addressed store, hash-verified

211}
212
213async fn invoke<Req: Message, Res: Message + Default>(
214 service: &LocalService,
215 method: &str,
216 request: &Req,
217) -> Res {
218 let bytes = service
219 .call(method, &request.encode_to_vec())
220 .await
221 .unwrap();
222 Res::decode(bytes.as_slice()).unwrap()
223}
224
225async fn resolve(service: &LocalService, path: &Path) -> proto::RepositoryRef {
226 let response: proto::ResolveRepositoryResponse = invoke(

Calls 4

decodeFunction · 0.50
unwrapMethod · 0.45
callMethod · 0.45
as_sliceMethod · 0.45

Tested by

no test coverage detected