(path: &str)
| 22 | impl Parser { |
| 23 | #[new] |
| 24 | fn new(path: &str) -> PyResult<Self> { |
| 25 | let mut stream = std::fs::File::open(&path)?; |
| 26 | let filesize = stream.metadata()?.len(); |
| 27 | |
| 28 | let input = Input::from_stream(&mut stream, filesize, &path, |_|(), Arc::new(AtomicBool::new(false)))?; |
| 29 | |
| 30 | Ok(Self { |
| 31 | camera: Some(input.camera_type()), |
| 32 | model: input.camera_model().map(String::clone), |
| 33 | input: Mutex::new(input), |
| 34 | }) |
| 35 | } |
| 36 | |
| 37 | #[pyo3(signature = (human_readable=None))] |
| 38 | fn telemetry<'py>(&self, py: Python<'py>, human_readable: Option<bool>) -> PyResult<Bound<'py, PyAny>> { |
nothing calls this directly
no test coverage detected