Struct bulletformat::DataLoader
source · pub struct DataLoader<T> { /* private fields */ }Implementations§
source§impl<T: BulletFormat> DataLoader<T>
impl<T: BulletFormat> DataLoader<T>
pub fn new(path: impl AsRef<Path>, buffer_size_mb: usize) -> Result<Self>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn map_batches<F: FnMut(&[T])>(self, batch_size: usize, f: F)
pub fn max_batch_size(&self) -> usize
pub fn map_positions<F: FnMut(&T)>(self, f: F)
pub fn map_batches_threaded_loading<F: FnMut(&[T])>( self, batch_size: usize, f: F )
Auto Trait Implementations§
impl<T> Freeze for DataLoader<T>
impl<T> RefUnwindSafe for DataLoader<T>where
T: RefUnwindSafe,
impl<T> Send for DataLoader<T>where
T: Send,
impl<T> Sync for DataLoader<T>where
T: Sync,
impl<T> Unpin for DataLoader<T>where
T: Unpin,
impl<T> UnwindSafe for DataLoader<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