Struct arrow2::ffi::ArrowArrayStreamReader
source · pub struct ArrowArrayStreamReader { /* private fields */ }Expand description
Implements an iterator of Array consumed from the C stream interface.
Implementations§
source§impl ArrowArrayStreamReader
impl ArrowArrayStreamReader
sourcepub unsafe fn try_new(iter: Box<ArrowArrayStream>) -> Result<Self, Error>
pub unsafe fn try_new(iter: Box<ArrowArrayStream>) -> Result<Self, Error>
Returns a new ArrowArrayStreamReader
§Error
Errors iff the ArrowArrayStream is out of specification
§Safety
This method is intrinsically unsafe since it assumes that the ArrowArrayStream
contains a valid Arrow C stream interface.
In particular:
- The
ArrowArrayStreamfulfills the invariants of the C stream interface - The schema
get_schemaproduces fulfills the C data interface
sourcepub unsafe fn next(&mut self) -> Option<Result<Box<dyn Array>, Error>>
pub unsafe fn next(&mut self) -> Option<Result<Box<dyn Array>, Error>>
Advances this iterator by one array
§Error
Errors iff:
- The C stream interface returns an error
- The C stream interface returns an invalid array (that we can identify, see Safety below)
§Safety
Calling this iterator’s next assumes that the ArrowArrayStream produces arrow arrays
that fulfill the C data interface
Auto Trait Implementations§
impl Freeze for ArrowArrayStreamReader
impl RefUnwindSafe for ArrowArrayStreamReader
impl !Send for ArrowArrayStreamReader
impl !Sync for ArrowArrayStreamReader
impl Unpin for ArrowArrayStreamReader
impl UnwindSafe for ArrowArrayStreamReader
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