MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / to_json

Function to_json

supervisor/src/web_api.rs:33–38  ·  view source on GitHub ↗
(r: Result<T>)

Source from the content-addressed store, hash-verified

31}
32
33fn to_json<T: Serialize>(r: Result<T>) -> Json<Response<T>> {
34 match r {
35 Ok(data) => Json(Response::Data(data)),
36 Err(e) => Json(Response::Error(format!("{e:?}"))),
37 }
38}
39
40#[post("/deploy", data = "<config>")]
41async fn deploy(supervisor: &State<Supervisor>, config: Json<ProcessConfig>) -> Json<Response<()>> {

Callers 8

deployFunction · 0.85
startFunction · 0.85
stopFunction · 0.85
removeFunction · 0.85
listFunction · 0.85
infoFunction · 0.85
clearFunction · 0.85
shutdownFunction · 0.85

Calls 1

DataClass · 0.85

Tested by

no test coverage detected