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

Function set_ctx

crates/openshell-ocsf/src/ctx.rs:30–32  ·  view source on GitHub ↗

Initialise the process-wide OCSF sandbox context. Returns `false` if the context was already set; the caller may log and continue. Intended to be called exactly once during sandbox startup.

(ctx: SandboxContext)

Source from the content-addressed store, hash-verified

28/// Returns `false` if the context was already set; the caller may log and
29/// continue. Intended to be called exactly once during sandbox startup.
30pub fn set_ctx(ctx: SandboxContext) -> bool {
31 OCSF_CTX.set(ctx).is_ok()
32}
33
34/// Return a reference to the process-wide [`SandboxContext`].
35///

Callers 1

run_sandboxFunction · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected