pub struct SnapshotWithThreadMode<'a, D: DBAccess> { /* private fields */ }
Expand description

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

Examples

use rocksdb::{DB, IteratorMode, Options};

let path = "_path_for_rocksdb_storage3";
{
    let db = DB::open_default(path).unwrap();
    let snapshot = db.snapshot(); // Creates a longer-term snapshot of the DB, but closed when goes out of scope
    let mut iter = snapshot.iterator(IteratorMode::Start); // Make as many iterators as you'd like from one snapshot
}
let _ = DB::destroy(&Options::default(), path);

Implementations§

Creates a new SnapshotWithThreadMode of the database db.

Creates an iterator over the data in this snapshot, using the default read options.

Creates an iterator over the data in this snapshot under the given column family, using the default read options.

Creates an iterator over the data in this snapshot, using the given read options.

Creates an iterator over the data in this snapshot under the given column family, using the given read options.

Creates a raw iterator over the data in this snapshot, using the default read options.

Creates a raw iterator over the data in this snapshot under the given column family, using the default read options.

Creates a raw iterator over the data in this snapshot, using the given read options.

Creates a raw iterator over the data in this snapshot under the given column family, using the given read options.

Returns the bytes associated with a key value with default read options.

Returns the bytes associated with a key value and given column family with default read options.

Returns the bytes associated with a key value and given read options.

Returns the bytes associated with a key value, given column family and read options.

Returns the bytes associated with the given key values and default read options.

Returns the bytes associated with the given key values and default read options.

Returns the bytes associated with the given key values and given read options.

Returns the bytes associated with the given key values, given column family and read options.

Trait Implementations§

Executes the destructor for this type. Read more

Send and Sync implementations for SnapshotWithThreadMode are safe, because SnapshotWithThreadMode is immutable and can be safely shared between threads.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.