pub struct BlockReader<R: Read + Seek> {
pub reader: R,
}Available on crate feature
io_ipc only.Expand description
A reader that has access to exactly one standalone IPC Block of an Arrow IPC file.
The block contains either a RecordBatch or a DictionaryBatch.
The dictionaries field must be initialized prior to decoding a RecordBatch.
Fields§
§reader: RImplementations§
Source§impl<R: Read + Seek> BlockReader<R>
impl<R: Read + Seek> BlockReader<R>
pub fn new(reader: R) -> Self
Sourcepub fn record_batch_num_rows(
&mut self,
message_scratch: &mut Vec<u8>,
) -> PolarsResult<usize>
pub fn record_batch_num_rows( &mut self, message_scratch: &mut Vec<u8>, ) -> PolarsResult<usize>
Reads the record batch header and returns its length (i.e., number of rows).
Sourcepub fn record_batch_custom_metadata<'a>(
&mut self,
message_scratch: &'a mut Vec<u8>,
) -> PolarsResult<Option<Vec<KeyValueRef<'a>>>>
pub fn record_batch_custom_metadata<'a>( &mut self, message_scratch: &'a mut Vec<u8>, ) -> PolarsResult<Option<Vec<KeyValueRef<'a>>>>
Reads the record batch header and returns the custom_metadata.
Auto Trait Implementations§
impl<R> Freeze for BlockReader<R>where
R: Freeze,
impl<R> RefUnwindSafe for BlockReader<R>where
R: RefUnwindSafe,
impl<R> Send for BlockReader<R>where
R: Send,
impl<R> Sync for BlockReader<R>where
R: Sync,
impl<R> Unpin for BlockReader<R>where
R: Unpin,
impl<R> UnwindSafe for BlockReader<R>where
R: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more