(sandbox: &DriverSandbox)
| 76 | |
| 77 | impl PodmanSandboxDriverConfig { |
| 78 | pub fn from_sandbox(sandbox: &DriverSandbox) -> Result<Self, ComputeDriverError> { |
| 79 | let Some(template) = sandbox |
| 80 | .spec |
| 81 | .as_ref() |
| 82 | .and_then(|spec| spec.template.as_ref()) |
| 83 | else { |
| 84 | return Ok(Self::default()); |
| 85 | }; |
| 86 | |
| 87 | Self::from_template(template) |
| 88 | } |
| 89 | |
| 90 | pub fn from_template(template: &DriverSandboxTemplate) -> Result<Self, ComputeDriverError> { |
| 91 | let Some(config) = template.driver_config.as_ref() else { |
nothing calls this directly
no outgoing calls
no test coverage detected