Skip to main content

ChainStorage

Trait ChainStorage 

Source
pub trait ChainStorage<Primitives: NodePrimitives>: Send + Sync {
    // Required methods
    fn reader<TX, Types>(
        &self,
    ) -> impl ChainStorageReader<DatabaseProvider<TX, Types>, Primitives>
       where TX: DbTx + 'static,
             Types: NodeTypesForProvider<Primitives = Primitives>;
    fn writer<TX, Types>(
        &self,
    ) -> impl ChainStorageWriter<DatabaseProvider<TX, Types>, Primitives>
       where TX: DbTxMut + DbTx + 'static,
             Types: NodeTypesForProvider<Primitives = Primitives>;
}
Expand description

Trait that provides access to implementations of ChainStorage

Required Methods§

Source

fn reader<TX, Types>( &self, ) -> impl ChainStorageReader<DatabaseProvider<TX, Types>, Primitives>
where TX: DbTx + 'static, Types: NodeTypesForProvider<Primitives = Primitives>,

Provides access to the chain reader.

Source

fn writer<TX, Types>( &self, ) -> impl ChainStorageWriter<DatabaseProvider<TX, Types>, Primitives>
where TX: DbTxMut + DbTx + 'static, Types: NodeTypesForProvider<Primitives = Primitives>,

Provides access to the chain writer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<N, T, H> ChainStorage<N> for EmptyBodyStorage<T, H>
where T: FullSignedTx, H: FullBlockHeader, N: NodePrimitives<Block = Block<T, H>, BlockHeader = H, BlockBody = BlockBody<T, H>, SignedTx = T>,

Source§

impl<N, T, H> ChainStorage<N> for EthStorage<T, H>
where T: FullSignedTx, H: FullBlockHeader, N: NodePrimitives<Block = Block<T, H>, BlockHeader = H, BlockBody = BlockBody<T, H>, SignedTx = T>,