MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / parse_sandbox_policy

Function parse_sandbox_policy

crates/openshell-policy/src/lib.rs:960–965  ·  view source on GitHub ↗

Parse a sandbox policy from a YAML string.

(yaml: &str)

Source from the content-addressed store, hash-verified

958
959/// Parse a sandbox policy from a YAML string.
960pub fn parse_sandbox_policy(yaml: &str) -> Result<SandboxPolicy> {
961 let raw: PolicyFile = serde_yml::from_str(yaml)
962 .into_diagnostic()
963 .wrap_err("failed to parse sandbox policy YAML")?;
964 Ok(to_proto(raw))
965}
966
967/// Serialize a proto sandbox policy to a YAML string.
968///

Calls 1

to_protoFunction · 0.85