(&self, logs: Vec<Log>, py: Python<'py>)
| 39 | } |
| 40 | |
| 41 | pub fn decode_logs<'py>(&self, logs: Vec<Log>, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> { |
| 42 | let decoder = self.clone(); |
| 43 | |
| 44 | future_into_py(py, async move { |
| 45 | Ok(tokio::task::spawn_blocking(move || { |
| 46 | Python::attach(|py| decoder.decode_logs_sync(logs, py)) |
| 47 | }) |
| 48 | .await |
| 49 | .unwrap()) |
| 50 | }) |
| 51 | } |
| 52 | |
| 53 | pub fn decode_logs_sync(&self, logs: Vec<Log>, py: Python) -> Vec<Option<DecodedEvent>> { |
| 54 | logs.iter() |