Skip to main content

ArrowArrayStream

Struct ArrowArrayStream 

Source
#[repr(C)]
pub struct ArrowArrayStream { pub get_schema: Option<unsafe extern "C" fn(stream: *mut ArrowArrayStream, out: *mut ArrowSchema) -> c_int>, pub get_next: Option<unsafe extern "C" fn(stream: *mut ArrowArrayStream, out: *mut ArrowArray) -> c_int>, pub get_last_error: Option<unsafe extern "C" fn(stream: *mut ArrowArrayStream) -> *const c_char>, pub release: Option<unsafe extern "C" fn(stream: *mut ArrowArrayStream)>, pub private_data: *mut c_void, }
Expand description

ArrowArray C Stream Interface is a streaming producer of Arrow record batches.

https://arrow.apache.org/docs/format/CStreamInterface.html#the-arrowarraystream-structure

Ownership: This type has no Drop impl. Callers must invoke the release callback (if Some) before dropping to free resources.

Fields§

§get_schema: Option<unsafe extern "C" fn(stream: *mut ArrowArrayStream, out: *mut ArrowSchema) -> c_int>

Get the schema of the stream.

On success, writes to *out and returns 0. On error, returns non-zero; caller may call get_last_error.

§get_next: Option<unsafe extern "C" fn(stream: *mut ArrowArrayStream, out: *mut ArrowArray) -> c_int>

Get the next record batch.

On success, writes to *out and returns 0. End-of-stream is signaled by writing a released array (release == None). On error, returns non-zero; caller may call get_last_error.

§get_last_error: Option<unsafe extern "C" fn(stream: *mut ArrowArrayStream) -> *const c_char>

Get a human-readable error message for the last error.

Returns a pointer to a null-terminated string, or null if no error. The pointer is valid until the next call on this stream or until release.

§release: Option<unsafe extern "C" fn(stream: *mut ArrowArrayStream)>

Release the stream and all associated resources.

After calling, the stream is in a released state (all pointers None/null).

§private_data: *mut c_void

Opaque producer-specific data.

Implementations§

Source§

impl ArrowArrayStream

Source

pub fn empty() -> Self

Create an empty (released) stream.

Source

pub fn is_released(&self) -> bool

Whether this stream has been released (release callback is None).

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.