Parse a UUID string, returning a PyErr on failure.
(scope_uuid: &str)
| 1265 | |
| 1266 | /// Parse a UUID string, returning a PyErr on failure. |
| 1267 | fn 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`. |
no outgoing calls
no test coverage detected