[−][src]Struct exonum_rocksdb::Snapshot
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]
pub fn new(db: &DB) -> Snapshot
[src]
ⓘImportant traits for DBIteratorpub fn iterator(&self, mode: IteratorMode) -> DBIterator
[src]
ⓘImportant traits for DBIterator
pub fn iterator_cf(
&self,
cf_handle: ColumnFamily,
mode: IteratorMode
) -> Result<DBIterator, Error>
[src]
&self,
cf_handle: ColumnFamily,
mode: IteratorMode
) -> Result<DBIterator, Error>
pub fn raw_iterator(&self) -> DBRawIterator
[src]
pub fn raw_iterator_cf(
&self,
cf_handle: ColumnFamily
) -> Result<DBRawIterator, Error>
[src]
&self,
cf_handle: ColumnFamily
) -> Result<DBRawIterator, Error>
pub fn get(&self, key: &[u8]) -> Result<Option<DBVector>, Error>
[src]
pub fn get_cf(
&self,
cf: ColumnFamily,
key: &[u8]
) -> Result<Option<DBVector>, Error>
[src]
&self,
cf: ColumnFamily,
key: &[u8]
) -> Result<Option<DBVector>, Error>
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,