pub struct DataLoaderBuilder<D, C>{ /* private fields */ }Expand description
Configures a DataLoader before construction.
Implementations§
Source§impl<D, C> DataLoaderBuilder<D, C>
impl<D, C> DataLoaderBuilder<D, C>
Sourcepub fn batch_size(self, batch_size: usize) -> Self
pub fn batch_size(self, batch_size: usize) -> Self
Sets the batch size.
Sourcepub fn timeout(self, timeout: Option<Duration>) -> Self
pub fn timeout(self, timeout: Option<Duration>) -> Self
Sets an explicit worker receive timeout.
Sourcepub fn build(self) -> CoreResult<DataLoader<D, C>>
pub fn build(self) -> CoreResult<DataLoader<D, C>>
Builds the configured loader.
Auto Trait Implementations§
impl<D, C> Freeze for DataLoaderBuilder<D, C>
impl<D, C> RefUnwindSafe for DataLoaderBuilder<D, C>where
D: RefUnwindSafe,
C: RefUnwindSafe,
impl<D, C> Send for DataLoaderBuilder<D, C>
impl<D, C> Sync for DataLoaderBuilder<D, C>
impl<D, C> Unpin for DataLoaderBuilder<D, C>
impl<D, C> UnsafeUnpin for DataLoaderBuilder<D, C>where
D: UnsafeUnpin,
C: UnsafeUnpin,
impl<D, C> UnwindSafe for DataLoaderBuilder<D, C>where
D: UnwindSafe,
C: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DTypeEq<T> for T
impl<T> DTypeEq<T> for T
Source§const DTYPES_EQUAL: bool = true
const DTYPES_EQUAL: bool = true
A type is always dtype-equal to itself.
Source§const ASSERT_DTYPES_MATCH: ()
const ASSERT_DTYPES_MATCH: ()
Always passes, since T: DTypeEq<T> only reaches this impl when
the two types genuinely match.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<N> SameCount<N> for N
Source§impl<S> ShapeEq<S> for S
impl<S> ShapeEq<S> for S
Source§const SHAPES_EQUAL: bool = true
const SHAPES_EQUAL: bool = true
A type is always shape-equal to itself.
Source§const ASSERT_SHAPES_MATCH: ()
const ASSERT_SHAPES_MATCH: ()
Always passes, since S: ShapeEq<S> only reaches this impl when
the two types genuinely match.