MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / read_service_metadata

Function read_service_metadata

packages/server/src/main.rs:2315–2324  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2313}
2314
2315fn read_service_metadata() -> anyhow::Result<Option<ServiceMetadata>> {
2316 let path = service_metadata_path()?;
2317 if !path.exists() {
2318 return Ok(None);
2319 }
2320 let data = fs::read_to_string(&path).with_context(|| format!("read {}", path.display()))?;
2321 Ok(Some(serde_json::from_str(&data).with_context(|| {
2322 format!("parse service metadata {}", path.display())
2323 })?))
2324}
2325
2326fn write_service_metadata(metadata: &ServiceMetadata) -> anyhow::Result<()> {
2327 let path = service_metadata_path()?;

Callers 11

command_service_urlFunction · 0.85
stop_project_serviceFunction · 0.85
kill_all_servicesFunction · 0.85
service_statusFunction · 0.85
run_default_serviceFunction · 0.85
restart_detached_serviceFunction · 0.85
service_restart_portFunction · 0.85
mainFunction · 0.85

Calls 1

service_metadata_pathFunction · 0.85

Tested by

no test coverage detected