[][src]Struct dataloader::non_cached::Loader

pub struct Loader<K, V, F> where
    K: Eq + Hash + Clone,
    V: Clone,
    F: BatchFn<K, V>, 
{ /* fields omitted */ }

Implementations

impl<K, V, F> Loader<K, V, F> where
    K: Eq + Hash + Clone + Debug,
    V: Clone,
    F: BatchFn<K, V>, 
[src]

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]

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]

impl<K, V, F> Sync for Loader<K, V, F> where
    F: Send,
    K: Send,
    V: Send
[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.