#[repr(C)]pub struct FFI_ArrowArrayStream {
pub get_schema: Option<unsafe extern "C" fn(arg1: *mut Self, out: *mut FFI_ArrowSchema) -> c_int>,
pub get_next: Option<unsafe extern "C" fn(arg1: *mut Self, out: *mut FFI_ArrowArray) -> c_int>,
pub get_last_error: Option<unsafe extern "C" fn(arg1: *mut Self) -> *const c_char>,
pub release: Option<unsafe extern "C" fn(arg1: *mut Self)>,
pub private_data: *mut c_void,
}Expand description
ABI-compatible struct for ArrayStream from C Stream Interface
See https://arrow.apache.org/docs/format/CStreamInterface.html#structure-definitions
This was created by bindgen
Fields§
§get_schema: Option<unsafe extern "C" fn(arg1: *mut Self, out: *mut FFI_ArrowSchema) -> c_int>C function to get schema from the stream
get_next: Option<unsafe extern "C" fn(arg1: *mut Self, out: *mut FFI_ArrowArray) -> c_int>C function to get next array from the stream
get_last_error: Option<unsafe extern "C" fn(arg1: *mut Self) -> *const c_char>C function to get the error from last operation on the stream
release: Option<unsafe extern "C" fn(arg1: *mut Self)>C function to release the stream
private_data: *mut c_voidPrivate data used by the stream
Implementations§
Source§impl FFI_ArrowArrayStream
impl FFI_ArrowArrayStream
Sourcepub fn new(batch_reader: Box<dyn RecordBatchReader + Send>) -> Self
pub fn new(batch_reader: Box<dyn RecordBatchReader + Send>) -> Self
Creates a new FFI_ArrowArrayStream.
Sourcepub unsafe fn from_raw(raw_stream: *mut FFI_ArrowArrayStream) -> Self
pub unsafe fn from_raw(raw_stream: *mut FFI_ArrowArrayStream) -> Self
Takes ownership of the pointed to FFI_ArrowArrayStream
This acts to move the data out of raw_stream, setting the release callback to NULL
§Safety
raw_streammust be valid for reads and writesraw_streammust be properly alignedraw_streammust point to a properly initialized value ofFFI_ArrowArrayStream
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Creates a new empty FFI_ArrowArrayStream. Used to import from the C Stream Interface.