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

Function sandbox_policy_get

crates/openshell-cli/src/run.rs:6940–6971  ·  view source on GitHub ↗
(
    server: &str,
    name: &str,
    version: u32,
    view: PolicyGetView,
    output: &str,
    tls: &TlsOptions,
)

Source from the content-addressed store, hash-verified

6938}
6939
6940pub async fn sandbox_policy_get(
6941 server: &str,
6942 name: &str,
6943 version: u32,
6944 view: PolicyGetView,
6945 output: &str,
6946 tls: &TlsOptions,
6947) -> Result<()> {
6948 let mut stdout = Vec::new();
6949 let mut stderr = Vec::new();
6950 sandbox_policy_get_to_writer(
6951 server,
6952 name,
6953 version,
6954 view,
6955 output,
6956 tls,
6957 (&mut stdout, &mut stderr),
6958 )
6959 .await?;
6960
6961 {
6962 let mut terminal_stdout = std::io::stdout().lock();
6963 terminal_stdout.write_all(&stdout).into_diagnostic()?;
6964 }
6965 {
6966 let mut terminal_stderr = std::io::stderr().lock();
6967 terminal_stderr.write_all(&stderr).into_diagnostic()?;
6968 }
6969
6970 Ok(())
6971}
6972
6973#[doc(hidden)]
6974pub async fn sandbox_policy_get_to_writer<W, E>(

Callers 1

mainFunction · 0.85

Calls 1

Tested by

no test coverage detected