#[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_voidOpaque producer-specific data.
Implementations§
Source§impl ArrowArrayStream
impl ArrowArrayStream
Sourcepub fn is_released(&self) -> bool
pub fn is_released(&self) -> bool
Whether this stream has been released (release callback is None).