pub struct Rocksdb { /* private fields */ }
Expand description
Rocksdb service support.
Capabilities
This service can be used to:
- read
- write
-
list -
presign -
multipart - blocking
Note
The storage format for this service is not stable yet.
PLEASE DON’T USE THIS SERVICE FOR PERSIST DATA.
Configuration
root
: Set the working directory ofOpenDAL
datadir
: Set the path to the rocksdb data directory
You can refer to RocksdbBuilder
’s docs for more information
Example
Via Builder
use anyhow::Result;
use opendal::services::Rocksdb;
use opendal::Object;
use opendal::Operator;
#[tokio::main]
async fn main() -> Result<()> {
let mut builder = Rocksdb::default();
builder.datadir("/tmp/opendal/rocksdb");
let op: Operator = Operator::create(builder)?.finish();
let _: Object = op.object("test_file");
Ok(())
}
Implementations§
Trait Implementations§
source§impl Builder for RocksdbBuilder
impl Builder for RocksdbBuilder
source§impl Clone for RocksdbBuilder
impl Clone for RocksdbBuilder
source§fn clone(&self) -> RocksdbBuilder
fn clone(&self) -> RocksdbBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RocksdbBuilder
impl Debug for RocksdbBuilder
source§impl Default for RocksdbBuilder
impl Default for RocksdbBuilder
source§fn default() -> RocksdbBuilder
fn default() -> RocksdbBuilder
Returns the “default value” for a type. Read more