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

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

Methods

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

pub fn new(load_fn: F) -> Loader<K, V, E, F>[src]

pub fn with_yield_count(load_fn: F, yield_count: usize) -> Loader<K, V, E, F>[src]

pub async fn load<'_>(&'_ self, key: K) -> Result<V, F::Error>[src]

pub async fn load_many<'_>(
    &'_ self,
    keys: Vec<K>
) -> HashMap<K, Result<V, F::Error>>
[src]

Trait Implementations

impl<K, V, E, F> Clone for Loader<K, V, E, F> where
    K: Eq + Hash + Clone,
    V: Clone,
    E: Clone,
    F: BatchFn<K, V, Error = E>, 
[src]

Auto Trait Implementations

impl<K, V, E, F> !RefUnwindSafe for Loader<K, V, E, F>

impl<K, V, E, F> Send for Loader<K, V, E, F> where
    E: Send,
    F: Send,
    K: Send,
    V: Send

impl<K, V, E, F> Sync for Loader<K, V, E, F> where
    E: Send,
    F: Send,
    K: Send,
    V: Send

impl<K, V, E, F> Unpin for Loader<K, V, E, F>

impl<K, V, E, F> !UnwindSafe for Loader<K, V, E, F>

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.