Skip to main content

DbTxProvider

Trait DbTxProvider 

Source
pub trait DbTxProvider {
    type Tx: DbTx;

    // Required method
    fn tx(&self) -> &Self::Tx;
}
Available on crate feature storage-api only.
Expand description

Provides shared access to a database transaction.

Required Associated Types§

Source

type Tx: DbTx

Underlying database transaction held by the provider.

Required Methods§

Source

fn tx(&self) -> &Self::Tx

Returns the underlying database transaction.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'a, T> DbTxProvider for &'a T
where T: 'a + DbTxProvider + ?Sized,

Source§

type Tx = <T as DbTxProvider>::Tx

Source§

fn tx(&self) -> &<&'a T as DbTxProvider>::Tx

Implementors§

Source§

impl<ChainSpec, N> DbTxProvider for NoopProvider<ChainSpec, N>
where ChainSpec: Send + Sync, N: NodePrimitives,

Available on crate feature db-api only.
Source§

impl<T, ChainSpec> DbTxProvider for MockEthProvider<T, ChainSpec>
where T: NodePrimitives, ChainSpec: EthChainSpec + 'static,

Source§

impl<TX, N> DbTxProvider for DatabaseProvider<TX, N>
where TX: DbTx + 'static, N: NodeTypes + 'static,

Source§

type Tx = TX