Dataloader
Rust implementation of Facebook's DataLoader using async-await.
Features
- Batching load requests with caching
- Batching load requests without caching
Usage
Switching runtime, by using cargo features
runtime-async-std
(default), to use the async-std runtime- dataloader = "0.14"
runtime-tokio
to use the Tokio runtime- dataloader = { version = "0.14", default-features = false, features = ["runtime-tokio"]}
Add to your Cargo.toml
:
[]
= "0.14"
= "0.3"
= "0.1"
Example:
use async_trait;
use Loader;
use BatchFn;
use block_on;
use HashMap;
use thread;
;
LICENSE
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.