RocksDbTrait

Trait RocksDbTrait 

Source
pub trait RocksDbTrait {
    type Transaction<'a>: RocksDbTransaction
       where Self: 'a;

    // Required methods
    fn txn(&self) -> Self::Transaction<'_>;
    fn get(&self, cf: &str, key: &[u8]) -> Option<Vec<u8>>;
}
Expand description

RocksDB trait for database operations with transaction support

Required Associated Types§

Source

type Transaction<'a>: RocksDbTransaction where Self: 'a

Required Methods§

Source

fn txn(&self) -> Self::Transaction<'_>

Create a new transaction

Source

fn get(&self, cf: &str, key: &[u8]) -> Option<Vec<u8>>

Direct get operation without transaction (for read-only operations)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§