#[repr(transparent)]pub struct PyArray(pub FieldArray);Expand description
Transparent wrapper around MinArrow’s FieldArray.
Enables zero-copy conversion to/from PyArrow arrays via the Arrow C Data Interface. Preserves exact Arrow type metadata (e.g., Timestamp vs Date64) through the conversion.
§Example (Rust)
ⓘ
use minarrow_pyo3::PyArray;
use minarrow::FieldArray;
#[pyfunction]
fn process_array(arr: PyArray) -> PyResult<PyArray> {
let field_array: FieldArray = arr.into();
// Process...
Ok(PyArray::from(field_array))
}Tuple Fields§
§0: FieldArrayImplementations§
Source§impl PyArray
impl PyArray
Sourcepub fn new(field_array: FieldArray) -> Self
pub fn new(field_array: FieldArray) -> Self
Creates a new PyArray from a FieldArray.
Sourcepub fn field_array(&self) -> &FieldArray
pub fn field_array(&self) -> &FieldArray
Returns a reference to the inner MinArrow FieldArray.
Sourcepub fn into_inner(self) -> FieldArray
pub fn into_inner(self) -> FieldArray
Consumes self and returns the inner FieldArray.
Trait Implementations§
Source§impl From<FieldArray> for PyArray
impl From<FieldArray> for PyArray
Source§fn from(field_array: FieldArray) -> Self
fn from(field_array: FieldArray) -> Self
Converts to this type from the input type.
Source§impl From<PyArray> for FieldArray
impl From<PyArray> for FieldArray
Source§impl<'py> FromPyObject<'py> for PyArray
impl<'py> FromPyObject<'py> for PyArray
Auto Trait Implementations§
impl Freeze for PyArray
impl RefUnwindSafe for PyArray
impl Send for PyArray
impl Sync for PyArray
impl Unpin for PyArray
impl UnsafeUnpin for PyArray
impl UnwindSafe for PyArray
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
Source§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
Converts
self into an owned Python object, dropping type information.