pub trait Loader<K: Send + Sync + Hash + Eq + Clone + 'static>:
Send
+ Sync
+ 'static {
type Value: Send + Sync + Clone + 'static;
type Error: Send + Clone + 'static;
// Required method
fn load(
&self,
keys: &[K],
) -> impl Future<Output = Result<HashMap<K, Self::Value>, Self::Error>> + Send;
}
Available on crate feature
dataloader
only.Expand description
Trait for batch loading.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.