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

Function parse_encode_result_legacy

guardrail_ffi/src/lib.rs:308–317  ·  view source on GitHub ↗

Legacy FFI return: raw encoded payload as JSON (old guardrail_encode returned Value serialized).

(s: &str)

Source from the content-addressed store, hash-verified

306
307/// Legacy FFI return: raw encoded payload as JSON (old guardrail_encode returned Value serialized).
308fn parse_encode_result_legacy(s: &str) -> Option<EncodeResult> {
309 let payload: serde_json::Value = serde_json::from_str(s).ok()?;
310 Some(EncodeResult {
311 payload,
312 signature_injection_text: String::new(),
313 rules_applied_count: 0,
314 rule_names: Vec::new(),
315 policy_name: String::new(),
316 })
317}
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> {

Callers 1

encodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected