[−][src]Crate rocks
Rust-Rocks
The RocksDB API in Rustic Style.
Examples
use rocks::rocksdb::*; let opt = Options::default().map_db_options(|db_opt| db_opt.create_if_missing(true)); let db = DB::open(opt, "./data").unwrap(); assert!(db.put(WriteOptions::default_instance(), b"hello", b"world").is_ok()); match db.get(ReadOptions::default_instance(), b"hello") { Ok(ref value) => println!("hello: {:?}", value), Err(e) => eprintln!("error: {}", e), } let _ = db.delete(WriteOptions::default_instance(), b"hello").unwrap();
Re-exports
pub use error::Error; |
Modules
advanced_options | Advanced Options |
cache | A Cache is an interface that maps keys to values. |
compaction_filter |
|
compaction_job_stats |
|
comparator | A Comparator object provides a total order across slices that are used as keys in an sstable or a database. |
convenience | Misc utility functions. |
db | A DB is a persistent ordered map from keys to values. |
db_dump_tool | Dump and un-dump tools for rocksdb |
debug | Debug helper functions |
env | An Env is an interface used by the rocksdb implementation to access operating system functionality like the filesystem etc. |
error | A Status encapsulates the result of an operation. |
filter_policy | A database can be configured with a custom |
flush_block_policy | Determine when to flush a block. |
iostats_context | A thread local context for gathering io-stats efficiently and transparently. |
iterator | An iterator yields a sequence of key/value pairs from a source. |
listener |
|
merge_operator | The Merge Operator |
metadata | The metadata that describes a column family, a level, or a SST file, |
options | Common options for DB, CF, read/write/flush/compact... |
perf_context | A thread local context for gathering performance counter efficiently and transparently. |
perf_level | Config about how much perf stats to collect |
persistent_cache | Persistent cache interface for caching IO pages on a persistent medium. |
prelude | The |
rate_limiter | RateLimiter object can be shared among RocksDB instances to control write rate of flush and compaction. |
rocksdb | |
slice | Slice data structure for interacting with rocksdb keys and values. |
slice_transform | Class for specifying user-defined functions which perform a transformation on a slice. |
snapshot | Abstract handle to particular state of a DB. |
sst_file_manager | SstFileManager is used to track SST files in the DB and control there deletion rate. |
sst_file_writer | SstFileWriter is used to create sst files that can be added to database later. |
statistics | Analyze the performance of a DB |
table | Table options. |
table_properties | contains a bunch of read-only properties of its associated table. |
thread_status | This file defines the structures for exposing run-time status of any rocksdb-related thread. Such run-time status can be obtained via GetThreadList() API. |
transaction_log | WAL logs |
types | Define all public custom types here. |
universal_compaction | Universal style of compaction. |
utilities | |
version | |
wal_filter |
|
write_batch |
|
write_buffer_manager |
|
Type Definitions
Result | The result type returned by RocksDB, wraps Status |