(template: &DriverSandboxTemplate)
| 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)] |
nothing calls this directly
no test coverage detected