Struct exonum_rocksdb::Snapshot [] [src]

pub struct Snapshot<'a> { /* fields omitted */ }

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

extern crate tempdir;
extern crate exonum_rocksdb;

use exonum_rocksdb::{DB, IteratorMode};
use tempdir::TempDir;

let temp_dir = TempDir::new("storage1").unwrap();
let mut db = DB::open_default(temp_dir.path()).unwrap();
let snapshot = db.snapshot(); // Creates a longer-term snapshot of the DB
let mut iter = snapshot.iterator(IteratorMode::Start); // Make as many iterators as you'd like

Methods

impl<'a> Snapshot<'a>
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Trait Implementations

impl<'a> Drop for Snapshot<'a>
[src]

[src]

Executes the destructor for this type. Read more