pub struct StreamingDataReader<T> { /* private fields */ }Expand description
Streaming data reader for memory-efficient processing
Implementations§
Source§impl<T> StreamingDataReader<T>
impl<T> StreamingDataReader<T>
Sourcepub fn new(config: MemoryEfficientConfig) -> Self
pub fn new(config: MemoryEfficientConfig) -> Self
Create a new streaming data reader
Sourcepub fn load_from_iterator<I>(&mut self, data_iter: I) -> Result<(), MemoryError>where
I: Iterator<Item = T>,
pub fn load_from_iterator<I>(&mut self, data_iter: I) -> Result<(), MemoryError>where
I: Iterator<Item = T>,
Load data chunks from an iterator
Sourcepub fn next_chunk(&mut self) -> Option<&DataChunk<T>>
pub fn next_chunk(&mut self) -> Option<&DataChunk<T>>
Get the next chunk of data
Sourcepub fn memory_stats(&self) -> (usize, usize, Option<usize>)
pub fn memory_stats(&self) -> (usize, usize, Option<usize>)
Get current memory usage statistics
Sourcepub fn total_samples(&self) -> usize
pub fn total_samples(&self) -> usize
Get total number of samples
Sourcepub fn has_more_chunks(&self) -> bool
pub fn has_more_chunks(&self) -> bool
Check if there are more chunks to process
Auto Trait Implementations§
impl<T> Freeze for StreamingDataReader<T>
impl<T> RefUnwindSafe for StreamingDataReader<T>where
T: RefUnwindSafe,
impl<T> Send for StreamingDataReader<T>where
T: Send,
impl<T> Sync for StreamingDataReader<T>where
T: Sync,
impl<T> Unpin for StreamingDataReader<T>where
T: Unpin,
impl<T> UnwindSafe for StreamingDataReader<T>where
T: 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