basteh-0.4.0-alpha.2 has been yanked.
Note The main branch includes many breaking changes, switch to v0.3 branch for the released version.
Basteh(previously actix-storage) is a type erased wrapper around some key-value storages to provide common operations.
Install
Basteh is meant to be used alongside one the implementer crates, ex:
# Cargo.toml
[]
= "0.4.0-alpha.2"
= "0.4.0-alpha.2"
Usage
After you picked a backend:
use ;
use MemoryBackend;
async
Implementations
basteh-memory
basteh-sled
basteh-redis
Use cases
It can be usefull when:
- You don't know which key-value database you'll need later.
- You can't afford the long time compilation of some dbs while developing.
- memory store compiles pretty fast
- You're writing an extension library and need to support multiple storage backends.
Examples
There are bunch of examples in the examples folder, very basic ones thought, but it will give you the idea.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.