pyo3_arrow/ffi/from_python/array_reader.rs
1use crate::array_reader::PyArrayReader;
2use crate::ffi::from_python::utils::call_arrow_c_stream;
3use pyo3::prelude::*;
4use pyo3::{PyAny, PyResult};
5
6impl<'a> FromPyObject<'a> for PyArrayReader {
7 fn extract_bound(ob: &Bound<'a, PyAny>) -> PyResult<Self> {
8 let capsule = call_arrow_c_stream(ob)?;
9 Self::from_arrow_pycapsule(&capsule)
10 }
11}