(pairs: &[(&str, &str)])
| 50 | /// Create evidence from a map of key-value pairs. |
| 51 | #[must_use] |
| 52 | pub fn from_pairs(pairs: &[(&str, &str)]) -> Self { |
| 53 | let mut map = serde_json::Map::new(); |
| 54 | for (key, value) in pairs { |
| 55 | map.insert( |
| 56 | (*key).to_string(), |
| 57 | serde_json::Value::String((*value).to_string()), |
| 58 | ); |
| 59 | } |
| 60 | Self { |
| 61 | data: Some(serde_json::Value::Object(map)), |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | /// OCSF Remediation object. |
nothing calls this directly
no outgoing calls
no test coverage detected