[−][src]Struct dataloader::non_cached::Loader
Implementations
impl<K, V, F> Loader<K, V, F> where
K: Eq + Hash + Clone + Debug,
V: Clone,
F: BatchFn<K, V>,
[src]
K: Eq + Hash + Clone + Debug,
V: Clone,
F: BatchFn<K, V>,
pub fn new(load_fn: F) -> Loader<K, V, F>
[src]
pub fn with_max_batch_size(mut self: Self, max_batch_size: usize) -> Self
[src]
pub fn with_yield_count(mut self: Self, yield_count: usize) -> Self
[src]
pub fn max_batch_size(&self) -> usize
[src]
pub async fn load(&self, key: K) -> V
[src]
pub async fn load_many(&self, keys: Vec<K>) -> HashMap<K, V>
[src]
Trait Implementations
impl<K, V, F> Clone for Loader<K, V, F> where
K: Eq + Hash + Clone,
V: Clone,
F: BatchFn<K, V>,
[src]
K: Eq + Hash + Clone,
V: Clone,
F: BatchFn<K, V>,
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<K, V, F> !RefUnwindSafe for Loader<K, V, F>
[src]
impl<K, V, F> Send for Loader<K, V, F> where
F: Send,
K: Send,
V: Send,
[src]
F: Send,
K: Send,
V: Send,
impl<K, V, F> Sync for Loader<K, V, F> where
F: Send,
K: Send,
V: Send,
[src]
F: Send,
K: Send,
V: Send,
impl<K, V, F> Unpin for Loader<K, V, F>
[src]
impl<K, V, F> !UnwindSafe for Loader<K, V, F>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,