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

Function as_memory_urn

atomic-canonical/src/memory.rs:224–230  ·  view source on GitHub ↗

Wrap a local id into `urn:atomic:memory: ` unless already a urn.

(local: &str)

Source from the content-addressed store, hash-verified

222
223/// Wrap a local id into `urn:atomic:memory:<local>` unless already a urn.
224fn as_memory_urn(local: &str) -> String {
225 if local.starts_with("urn:atomic:") {
226 local.to_string()
227 } else {
228 format!("urn:atomic:memory:{local}")
229 }
230}
231
232fn require_str(fm: &Map<String, Value>, key: &str) -> Result<String> {
233 opt_str(fm, key)

Callers 1

lift_memoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected