Struct FFI_ArrowArrayStream
#[repr(C)]pub struct FFI_ArrowArrayStream {
pub get_schema: Option<unsafe extern "C" fn(_: *mut FFI_ArrowArrayStream, _: *mut FFI_ArrowSchema) -> i32>,
pub get_next: Option<unsafe extern "C" fn(_: *mut FFI_ArrowArrayStream, _: *mut FFI_ArrowArray) -> i32>,
pub get_last_error: Option<unsafe extern "C" fn(_: *mut FFI_ArrowArrayStream) -> *const i8>,
pub release: Option<unsafe extern "C" fn(_: *mut FFI_ArrowArrayStream)>,
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(_: *mut FFI_ArrowArrayStream, _: *mut FFI_ArrowSchema) -> i32>
C function to get schema from the stream
get_next: Option<unsafe extern "C" fn(_: *mut FFI_ArrowArrayStream, _: *mut FFI_ArrowArray) -> i32>
C function to get next array from the stream
get_last_error: Option<unsafe extern "C" fn(_: *mut FFI_ArrowArrayStream) -> *const i8>
C function to get the error from last operation on the stream
release: Option<unsafe extern "C" fn(_: *mut FFI_ArrowArrayStream)>
C function to release the stream
private_data: *mut c_void
Private data used by the stream
Implementations§
§impl FFI_ArrowArrayStream
impl FFI_ArrowArrayStream
pub fn new(
batch_reader: Box<dyn RecordBatchReader<Item = Result<RecordBatch, ArrowError>> + Send>,
) -> FFI_ArrowArrayStream
pub fn new( batch_reader: Box<dyn RecordBatchReader<Item = Result<RecordBatch, ArrowError>> + Send>, ) -> FFI_ArrowArrayStream
Creates a new FFI_ArrowArrayStream
.
pub unsafe fn from_raw(
raw_stream: *mut FFI_ArrowArrayStream,
) -> FFI_ArrowArrayStream
pub unsafe fn from_raw( raw_stream: *mut FFI_ArrowArrayStream, ) -> FFI_ArrowArrayStream
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_stream
must be valid for reads and writesraw_stream
must be properly alignedraw_stream
must point to a properly initialized value ofFFI_ArrowArrayStream
pub fn empty() -> FFI_ArrowArrayStream
pub fn empty() -> FFI_ArrowArrayStream
Creates a new empty FFI_ArrowArrayStream. Used to import from the C Stream Interface.
Trait Implementations§
§impl Debug for FFI_ArrowArrayStream
impl Debug for FFI_ArrowArrayStream
§impl Drop for FFI_ArrowArrayStream
impl Drop for FFI_ArrowArrayStream
impl Send for FFI_ArrowArrayStream
Auto Trait Implementations§
impl Freeze for FFI_ArrowArrayStream
impl RefUnwindSafe for FFI_ArrowArrayStream
impl !Sync for FFI_ArrowArrayStream
impl Unpin for FFI_ArrowArrayStream
impl UnwindSafe for FFI_ArrowArrayStream
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more