Crate rocksdb [] [src]

Rust wrapper for RocksDB.

Examples

 use rocksdb::DB;
 // NB: db is automatically closed at end of lifetime
 let db = DB::open_default("/path/for/rocksdb/storage").unwrap();
 db.put(b"my key", b"my value");
 match db.get(b"my key") {
    Ok(Some(value)) => println!("retrieved value {}", value.to_utf8().unwrap()),
    Ok(None) => println!("value not found"),
    Err(e) => println!("operational problem encountered: {}", e),
 }
 db.delete(b"my key").unwrap();

Reexports

pub use merge_operator::MergeOperands;

Modules

merge_operator

rustic merge operator

Structs

BlockBasedOptions

For configuring block-based file storage.

DB

RocksDB wrapper object.

DBIterator

An iterator over a database or column family, with specifiable ranges and direction.

DBVector

Wrapper around bytes stored in the database

Error
Options

Database-wide options around performance and behavior.

Snapshot

A consistent view of the database at the point of creation.

WriteBatch

An atomic batch of mutations.

WriteOptions

Optionally disable WAL or sync for this write.

Enums

DBCompactionStyle
DBCompressionType
DBRecoveryMode
Direction
IteratorMode

Functions

new_bloom_filter