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

Function call

libatomic/src/node.rs:14–25  ·  view source on GitHub ↗
(method: String, request: Buffer)

Source from the content-addressed store, hash-verified

12
13#[napi]
14pub async fn call(method: String, request: Buffer) -> napi::Result<Buffer> {
15 SERVICE
16 .call(&method, request.as_ref())
17 .await
18 .map(Buffer::from)
19 .map_err(|error| {
20 napi::Error::new(
21 napi::Status::GenericFailure,
22 format!("{}: {}", error.code(), error.message()),
23 )
24 })
25}
26
27#[napi]
28pub fn descriptor() -> Buffer {

Calls 2

as_refMethod · 0.80
callMethod · 0.45