WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

birktj/rocksbin-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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));

About

Rust rocksdb wrapper using serde and bincode for automatic serialization

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages