pub struct DataLoaderBuilder<E> { /* private fields */ }
Expand description
A builder for a DataLoader
Implementations§
Source§impl<E> DataLoaderBuilder<E>
impl<E> DataLoaderBuilder<E>
Sourcepub const fn batch_size(self, batch_size: usize) -> Self
pub const fn batch_size(self, batch_size: usize) -> Self
Set the batch size
Sourcepub const fn concurrency(self, concurrency: usize) -> Self
pub const fn concurrency(self, concurrency: usize) -> Self
Set the concurrency
Sourcepub const fn with_batch_size(&mut self, batch_size: usize) -> &mut Self
pub const fn with_batch_size(&mut self, batch_size: usize) -> &mut Self
Set the batch size
Sourcepub const fn with_delay(&mut self, delay: Duration) -> &mut Self
pub const fn with_delay(&mut self, delay: Duration) -> &mut Self
Set the delay
Sourcepub const fn with_concurrency(&mut self, concurrency: usize) -> &mut Self
pub const fn with_concurrency(&mut self, concurrency: usize) -> &mut Self
Set the concurrency
Sourcepub fn build(self, executor: E) -> DataLoader<E>
pub fn build(self, executor: E) -> DataLoader<E>
Build the dataloader
Trait Implementations§
Source§impl<E: Clone> Clone for DataLoaderBuilder<E>
impl<E: Clone> Clone for DataLoaderBuilder<E>
Source§fn clone(&self) -> DataLoaderBuilder<E>
fn clone(&self) -> DataLoaderBuilder<E>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<E: Debug> Debug for DataLoaderBuilder<E>
impl<E: Debug> Debug for DataLoaderBuilder<E>
Source§impl<E> Default for DataLoaderBuilder<E>
impl<E> Default for DataLoaderBuilder<E>
impl<E: Copy> Copy for DataLoaderBuilder<E>
Auto Trait Implementations§
impl<E> Freeze for DataLoaderBuilder<E>
impl<E> RefUnwindSafe for DataLoaderBuilder<E>where
E: RefUnwindSafe,
impl<E> Send for DataLoaderBuilder<E>where
E: Send,
impl<E> Sync for DataLoaderBuilder<E>where
E: Sync,
impl<E> Unpin for DataLoaderBuilder<E>where
E: Unpin,
impl<E> UnwindSafe for DataLoaderBuilder<E>where
E: 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