MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / parse_uuid

Function parse_uuid

crates/python/src/py_api/mod.rs:1267–1270  ·  view source on GitHub ↗

Parse a UUID string, returning a PyErr on failure.

(scope_uuid: &str)

Source from the content-addressed store, hash-verified

1265
1266/// Parse a UUID string, returning a PyErr on failure.
1267fn parse_uuid(scope_uuid: &str) -> PyResult<Uuid> {
1268 Uuid::parse_str(scope_uuid)
1269 .map_err(|e| PyErr::new::<pyo3::exceptions::PyValueError, _>(format!("invalid UUID: {e}")))
1270}
1271
1272/// Macro that generates a scope-local register/deregister pair for guardrails
1273/// whose callback signature is `(tool_name: str, json: Any) -> Any`.

Calls

no outgoing calls

Tested by

no test coverage detected