File: snapshot_outlive_transaction.rs

package info (click to toggle)
rust-rocksdb 0.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,128 kB
  • sloc: makefile: 2
file content (9 lines) | stat: -rw-r--r-- 224 bytes parent folder | download
1
2
3
4
5
6
7
8
9
use rocksdb::{TransactionDB, SingleThreaded};

fn main() {
    let db = TransactionDB::<SingleThreaded>::open_default("foo").unwrap();
    let _snapshot = {
        let txn = db.transaction();
        txn.snapshot()
    };
}