pub struct DataLoader<L: BatchLoad> { /* private fields */ }Implementations§
Source§impl<L> DataLoader<L>
impl<L> DataLoader<L>
pub fn new(loader: L) -> Self
pub fn with_max_batch_size(self, size: usize) -> Self
pub fn with_delay(self, delay: Duration) -> Self
pub async fn load(&self, key: L::Key) -> Result<L::Value, DataLoaderError>
pub fn clear(&self)
pub fn prime(&self, key: L::Key, value: Result<L::Value, DataLoaderError>)
Trait Implementations§
Auto Trait Implementations§
impl<L> Freeze for DataLoader<L>
impl<L> !RefUnwindSafe for DataLoader<L>
impl<L> Send for DataLoader<L>
impl<L> Sync for DataLoader<L>
impl<L> Unpin for DataLoader<L>
impl<L> !UnwindSafe for DataLoader<L>
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