husky-0.1.1 has been yanked.
Husky
Husky is a library for creating databases with an API similar to iterators. Its aim is to make cache and indexing easier.
It is built around sled, and can use either rkyv or serde for serialization through feature flags.
Features
- Typed sled trees
- Create new trees by:
- Reindexing into multiple keys
- Transforming into multiple entries
- Filtering entries by key and value
- Mapping single values
- Chaining two trees of same type
- Zipping two trees of same key type
- Make inserts easier by:
- Reducing values on insert
- Parsing values on insert
- Piping changes from one tree to another
- Store those trees in the database, or load them into memory
Examples
use ;
// Or husky::open("db_path").unwrap()
let db = open_temp.unwrap;
let tree: = db.open_tree.unwrap;
for i in 0..100
// Change the tree values
let double = tree.map;
double.iter
.flatten
.for_each;
// Change the tree keys
let string_idx = tree.index
.load
.unwrap
.map;
string_idx.iter
.flatten
.for_each;
// Zip two trees
let window = tree.zip;
window.iter
.flatten
.for_each| );