(deserializer: D)
| 54 | } |
| 55 | |
| 56 | fn deserialize_app_compose<'de, D>(deserializer: D) -> Result<AppComposeWrapper, D::Error> |
| 57 | where |
| 58 | D: serde::Deserializer<'de>, |
| 59 | { |
| 60 | #[derive(Debug, Clone, Deserialize)] |
| 61 | struct Config { |
| 62 | compose_file: String, |
| 63 | } |
| 64 | |
| 65 | let config = Config::deserialize(deserializer)?; |
| 66 | let content = fs::read_to_string(&config.compose_file) |
| 67 | .map_err(|e| D::Error::custom(format!("Failed to read compose file: {e}")))?; |
| 68 | let app_compose = serde_json::from_str(&content) |
| 69 | .map_err(|e| D::Error::custom(format!("Failed to parse compose file: {e}")))?; |
| 70 | Ok(AppComposeWrapper { |
| 71 | app_compose, |
| 72 | raw: content, |
| 73 | }) |
| 74 | } |
nothing calls this directly
no test coverage detected