Struct arrow_data::ffi::FFI_ArrowArray
source · #[repr(C)]pub struct FFI_ArrowArray { /* private fields */ }Expand description
ABI-compatible struct for ArrowArray from C Data Interface See https://arrow.apache.org/docs/format/CDataInterface.html#structure-definitions
fn export_array(array: &ArrayData) -> FFI_ArrowArray {
FFI_ArrowArray::new(array)
}Implementations§
source§impl FFI_ArrowArray
impl FFI_ArrowArray
sourcepub fn new(data: &ArrayData) -> Self
pub fn new(data: &ArrayData) -> Self
creates a new FFI_ArrowArray from existing data.
Memory Leaks
This method releases buffers. Consumers of this struct must call release before
releasing this struct, or contents in buffers leak.
sourcepub fn is_released(&self) -> bool
pub fn is_released(&self) -> bool
Whether the array has been released
sourcepub fn null_count(&self) -> usize
pub fn null_count(&self) -> usize
the null count of the array
sourcepub fn buffer(&self, index: usize) -> *const u8
pub fn buffer(&self, index: usize) -> *const u8
Returns the buffer at the provided index
Panic
Panics if index exceeds the number of buffers or the buffer is not correctly aligned
sourcepub fn num_buffers(&self) -> usize
pub fn num_buffers(&self) -> usize
Returns the number of buffers
sourcepub fn child(&self, index: usize) -> &FFI_ArrowArray
pub fn child(&self, index: usize) -> &FFI_ArrowArray
Returns the child at the provided index
sourcepub fn num_children(&self) -> usize
pub fn num_children(&self) -> usize
Returns the number of children
sourcepub fn dictionary(&self) -> Option<&Self>
pub fn dictionary(&self) -> Option<&Self>
Returns the dictionary if any