(
value: Option<&Bound<'_, PyAny>>,
)
| 290 | } |
| 291 | |
| 292 | fn parse_cache_request_facts( |
| 293 | value: Option<&Bound<'_, PyAny>>, |
| 294 | ) -> PyResult<Option<CacheRequestFacts>> { |
| 295 | let Some(request_facts) = opt_py_to_json(value)? else { |
| 296 | return Ok(None); |
| 297 | }; |
| 298 | |
| 299 | serde_json::from_value(request_facts) |
| 300 | .map(Some) |
| 301 | .map_err(|e| pyo3::exceptions::PyValueError::new_err(format!("invalid request_facts: {e}"))) |
| 302 | } |
| 303 | |
| 304 | #[pyfunction] |
| 305 | #[allow(clippy::too_many_arguments)] |
no test coverage detected