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

Method from_template

crates/openshell-driver-docker/src/lib.rs:296–303  ·  view source on GitHub ↗
(template: &DriverSandboxTemplate)

Source from the content-addressed store, hash-verified

294
295impl DockerSandboxDriverConfig {
296 fn from_template(template: &DriverSandboxTemplate) -> Result<Self, String> {
297 let Some(config) = template.driver_config.as_ref() else {
298 return Ok(Self::default());
299 };
300
301 serde_json::from_value(struct_to_json_value(config))
302 .map_err(|err| format!("invalid docker driver_config: {err}"))
303 }
304}
305
306use openshell_core::driver_mounts::SelinuxLabel;

Callers

nothing calls this directly

Calls 1

struct_to_json_valueFunction · 0.85

Tested by

no test coverage detected