reth_db::table

Trait TableImporter

pub trait TableImporter: DbTxMut {
    // Provided methods
    fn import_table<T, R>(&self, source_tx: &R) -> Result<(), DatabaseError>
       where T: Table,
             R: DbTx { ... }
    fn import_table_with_range<T, R>(
        &self,
        source_tx: &R,
        from: Option<<T as Table>::Key>,
        to: <T as Table>::Key,
    ) -> Result<(), DatabaseError>
       where T: Table,
             R: DbTx,
             <T as Table>::Key: Default { ... }
    fn import_dupsort<T, R>(&self, source_tx: &R) -> Result<(), DatabaseError>
       where T: DupSort,
             R: DbTx { ... }
}
Expand description

Allows duplicating tables across databases

Provided Methods§

fn import_table<T, R>(&self, source_tx: &R) -> Result<(), DatabaseError>
where T: Table, R: DbTx,

Imports all table data from another transaction.

fn import_table_with_range<T, R>( &self, source_tx: &R, from: Option<<T as Table>::Key>, to: <T as Table>::Key, ) -> Result<(), DatabaseError>
where T: Table, R: DbTx, <T as Table>::Key: Default,

Imports table data from another transaction within a range.

fn import_dupsort<T, R>(&self, source_tx: &R) -> Result<(), DatabaseError>
where T: DupSort, R: DbTx,

Imports all dupsort data from another transaction.

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 TableImporter for Tx<RW>

Available on crate feature mdbx only.
§

impl TableImporter for TxMock