Trait BlockStoreProvider

Source
pub trait BlockStoreProvider {
    type Reader<'a>: BlockStoreTransaction
       where Self: 'a;
    type ReaderWriter<'a>: BlockStoreTransaction
       where Self: 'a;

    // Required methods
    fn checkout_ro(&self) -> Result<Self::Reader<'_>, BlockStoreError>;
    fn checkout_rw(&mut self) -> Result<Self::ReaderWriter<'_>, BlockStoreError>;
}
Expand description

A block store that supports read/write operations consistently.

Required Associated Types§

Source

type Reader<'a>: BlockStoreTransaction where Self: 'a

Reader alias.

Source

type ReaderWriter<'a>: BlockStoreTransaction where Self: 'a

ReaderWriter alias.

Required Methods§

Source

fn checkout_ro(&self) -> Result<Self::Reader<'_>, BlockStoreError>

Check out read only handle.

Source

fn checkout_rw(&mut self) -> Result<Self::ReaderWriter<'_>, BlockStoreError>

Check out read write handle.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl BlockStoreProvider for IndexedLmdbBlockStore

Source§

type Reader<'t> = IndexedLmdbBlockStoreReadTransaction<'t>

Source§

type ReaderWriter<'t> = IndexedLmdbBlockStoreRWTransaction<'t>

Source§

impl BlockStoreProvider for LmdbBlockStore

Source§

type Reader<'t> = LmdbBlockStoreTransaction<'t, RoTransaction<'t>>

Source§

type ReaderWriter<'t> = LmdbBlockStoreTransaction<'t, RwTransaction<'t>>