rocksbin

Crates.iorocksbin
lib.rsrocksbin
version0.3.0
sourcesrc
created_at2018-11-28 20:23:58.628116
updated_at2019-01-31 15:48:33.320211
descriptionA simple rocksdb wrapper using serde and bincode for automatic serialization
homepagehttps://github.com/birktj/rocksbin-db
repositoryhttps://github.com/birktj/rocksbin-db
max_upload_size
id99136
size27,422
Birk Tjelmeland (birktj)

documentation

https://docs.rs/rocksbin

README

Rocksbin-db

Build Status Crates.io Documentation GitHub license

A simple rust rocksdb wrapper using serde and bincode for automatic serialization.

This library is perfect if what you want is a persistent HashMap stored on disk and a simple API.

extern crate rocksbin;

use rocksbin::DB;

let db = DB::open("db_dir").unwrap();

let fish_count = db.prefix::<String, u64>(b"fish_count").unwarp();

fish_count.insert("salmon", 10).unwarp();
fish_count.insert("cod", 100).unwarp();
fish_count.insert("mackerel", 70).unwarp();

assert_eq!(fish_count.get("salmon").unwarp(), Some(10));
Commit count: 37

cargo fmt