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

Method from_template

crates/openshell-driver-podman/src/container.rs:90–98  ·  view source on GitHub ↗
(template: &DriverSandboxTemplate)

Source from the content-addressed store, hash-verified

88 }
89
90 pub fn from_template(template: &DriverSandboxTemplate) -> Result<Self, ComputeDriverError> {
91 let Some(config) = template.driver_config.as_ref() else {
92 return Ok(Self::default());
93 };
94
95 serde_json::from_value(proto_struct::struct_to_json_value(config)).map_err(|err| {
96 ComputeDriverError::InvalidArgument(format!("invalid podman driver_config: {err}"))
97 })
98 }
99}
100
101#[derive(Debug, Clone, serde::Deserialize)]

Callers

nothing calls this directly

Calls 1

struct_to_json_valueFunction · 0.85

Tested by

no test coverage detected