pub struct ArrowIpcReader { /* private fields */ }Expand description
Cursor-based Arrow IPC message reader.
Implementations§
Source§impl ArrowIpcReader
impl ArrowIpcReader
Sourcepub fn is_arrow_file(&self) -> bool
pub fn is_arrow_file(&self) -> bool
Returns true if data starts with the Arrow IPC magic bytes.
Sourcepub fn parse_file_header(&mut self) -> Result<(), StreamingError>
pub fn parse_file_header(&mut self) -> Result<(), StreamingError>
Validates and advances past the file header (magic + 2-byte padding).
§Errors
Returns an error if the buffer does not start with the Arrow magic bytes.
Sourcepub fn next_message(
&mut self,
) -> Result<Option<IpcMessageHeader>, StreamingError>
pub fn next_message( &mut self, ) -> Result<Option<IpcMessageHeader>, StreamingError>
Reads and returns the next IPC message header, or Ok(None) at EOS.
§Errors
Returns an error if the buffer is truncated mid-header.
Sourcepub fn read_buffer<'a>(
&'a self,
body_offset: u64,
buf: &IpcBuffer,
) -> Option<&'a [u8]>
pub fn read_buffer<'a>( &'a self, body_offset: u64, buf: &IpcBuffer, ) -> Option<&'a [u8]>
Returns the slice for an IpcBuffer relative to body_offset.
Returns None if the range falls outside the backing buffer.
Sourcepub fn current_offset(&self) -> usize
pub fn current_offset(&self) -> usize
Returns the current read cursor position.
Auto Trait Implementations§
impl Freeze for ArrowIpcReader
impl RefUnwindSafe for ArrowIpcReader
impl Send for ArrowIpcReader
impl Sync for ArrowIpcReader
impl Unpin for ArrowIpcReader
impl UnsafeUnpin for ArrowIpcReader
impl UnwindSafe for ArrowIpcReader
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