Struct leveldb::database::snapshots::Snapshot [-] [+] [src]

pub struct Snapshot<'a, K: Key + 'a> {
    // some fields omitted

A database snapshot

Represents a database at a certain point in time, and allows for all read operations (get and iteration).


impl<'a, K: Key> Snapshot<'a, K>

fn get(&'a self, options: ReadOptions<'a, K>, key: K) -> Result<Option<Vec<u8>>, Error>

fetches a key from the database

Inserts this snapshot into ReadOptions before reading

fn raw_ptr(&self) -> *mut leveldb_snapshot_t

Trait Implementations

impl<'a, K: Key + 'a> Iterable<'a, K> for Snapshot<'a, K>

fn iter(&'a self, options: ReadOptions<'a, K>) -> Iterator<K>

fn keys_iter(&'a self, options: ReadOptions<'a, K>) -> KeyIterator<K>

fn value_iter(&'a self, options: ReadOptions<'a, K>) -> ValueIterator<K>