3 releases
0.1.2 | Feb 23, 2021 |
---|---|
0.1.1 | Feb 23, 2021 |
0.1.0 | Feb 23, 2021 |
#2200 in Data structures
27 downloads per month
Used in keyplace
13KB
298 lines
toboggan-kv
Sled-flavored KV abstraction layer
let bta = BTreeAdapter::new();
braap(bta);
let tmpdir = tempfile::tempdir().unwrap();
let sa = SledAdapter::open(tmpdir.path()).unwrap();
braap(sa);
fn braap<T:Toboggan>( store: T ){
let beasts = store.open_tree("beasts").unwrap();
beasts.insert("meow", "cat").unwrap();
}
lib.rs
:
Toboggan - sled flavored KV abstraction
let bta = BTreeAdapter::new();
braap(bta);
let tmpdir = tempfile::tempdir().unwrap();
let sa = SledAdapter::open(tmpdir.path()).unwrap();
braap(sa);
fn braap<T:Toboggan>( store: T ){
let beasts = store.open_tree("beasts").unwrap();
beasts.insert("meow", "cat").unwrap();
}
Dependencies
~2–11MB
~118K SLoC