MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / parse_decode_result_legacy

Function parse_decode_result_legacy

guardrail_ffi/src/lib.rs:320–328  ·  view source on GitHub ↗

Legacy FFI return: raw decoded payload as JSON (old guardrail_decode returned Value serialized).

(s: &str)

Source from the content-addressed store, hash-verified

318
319/// Legacy FFI return: raw decoded payload as JSON (old guardrail_decode returned Value serialized).
320fn parse_decode_result_legacy(s: &str) -> Option<DecodeResult> {
321 let payload: serde_json::Value = serde_json::from_str(s).ok()?;
322 Some(DecodeResult {
323 payload,
324 rules_applied_count: 0,
325 rule_names: Vec::new(),
326 policy_name: String::new(),
327 })
328}
329
330fn parse_encode_result(s: &str) -> Option<EncodeResult> {
331 let v: serde_json::Value = serde_json::from_str(s).ok()?;

Callers 1

decodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected