Trait ChainStorage
pub trait ChainStorage<Primitives>: Send + Syncwhere
Primitives: FullNodePrimitives,{
// 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>;
}
Available on crate feature
provider
only.Expand description
Trait that provides access to implementations of ChainStorage
Required Methods§
fn reader<TX, Types>(
&self,
) -> impl ChainStorageReader<DatabaseProvider<TX, Types>, Primitives>where
TX: DbTx + 'static,
Types: NodeTypesForProvider<Primitives = Primitives>,
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.
fn writer<TX, Types>(
&self,
) -> impl ChainStorageWriter<DatabaseProvider<TX, Types>, Primitives>
fn writer<TX, Types>( &self, ) -> impl ChainStorageWriter<DatabaseProvider<TX, Types>, 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", so this trait is not object safe.