Struct arrow::ffi::ArrowArray[][src]

pub struct ArrowArray { /* fields omitted */ }
Expand description

Struct used to move an Array from and to the C Data Interface. Its main responsibility is to expose functionality that requires both FFI_ArrowArray and FFI_ArrowSchema.

This struct has two main paths:

Import from the C Data Interface

Export to the C Data Interface

Safety

Whoever creates this struct is responsible for releasing their resources. Specifically, consumers must call ArrowArray::into_raw and take ownership of the individual pointers, calling FFI_ArrowArray::release and FFI_ArrowSchema::release accordingly.

Furthermore, this struct assumes that the incoming data agrees with the C data interface.

Implementations

impl ArrowArray[src]

pub unsafe fn try_new(data: ArrayData) -> Result<Self>[src]

creates a new ArrowArray. This is used to export to the C Data Interface.

Safety

See safety of ArrowArray

pub unsafe fn try_from_raw(
    array: *const FFI_ArrowArray,
    schema: *const FFI_ArrowSchema
) -> Result<Self>
[src]

creates a new ArrowArray from two pointers. Used to import from the C Data Interface.

Safety

See safety of ArrowArray

Error

Errors if any of the pointers is null

pub unsafe fn empty() -> Self[src]

creates a new empty ArrowArray. Used to import from the C Data Interface.

Safety

See safety of ArrowArray

pub fn into_raw(
    this: ArrowArray
) -> (*const FFI_ArrowArray, *const FFI_ArrowSchema)
[src]

exports ArrowArray to the C Data Interface

Trait Implementations

impl ArrowArrayRef for ArrowArray[src]

fn data_type(&self) -> Result<DataType>[src]

the data_type as declared in the schema

fn array(&self) -> &FFI_ArrowArray[src]

fn schema(&self) -> &FFI_ArrowSchema[src]

fn owner(&self) -> &Arc<FFI_ArrowArray>[src]

fn to_data(&self) -> Result<ArrayData>[src]

fn buffers(&self) -> Result<Vec<Buffer>>[src]

returns all buffers, as organized by Rust (i.e. null buffer is skipped)

fn buffer_len(&self, i: usize) -> Result<usize>[src]

Returns the length, in bytes, of the buffer i (indexed according to the C data interface)

fn null_bit_buffer(&self) -> Option<Buffer>[src]

returns the null bit buffer. Rust implementation uses a buffer that is not part of the array of buffers. The C Data interface’s null buffer is part of the array of buffers. Read more

fn child(&self, index: usize) -> ArrowArrayChild<'_>[src]

impl Debug for ArrowArray[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl TryFrom<ArrayData> for ArrowArray[src]

type Error = ArrowError

The type returned in the event of a conversion error.

fn try_from(value: ArrayData) -> Result<Self>[src]

Performs the conversion.

impl TryFrom<ArrowArray> for ArrayData[src]

type Error = ArrowError

The type returned in the event of a conversion error.

fn try_from(value: ArrowArray) -> Result<Self>[src]

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V