Trait brontes_database::Table

pub trait Table:
    Send
    + Sync
    + Debug
    + 'static {
    type Key: Key;
    type Value: Value;

    const TABLE: Tables;
    const NAME: &'static str = _;
}
Expand description

Generic trait that a database table should follow.

The Table::Key and Table::Value types should implement [Encode] and [Decode] when appropriate. These traits define how the data is stored and read from the database.

It allows for the use of codecs. See [crate::models::ShardedKey] for a custom implementation.

Required Associated Types§

type Key: Key

Key element of Table.

Sorting should be taken into account when encoding this.

type Value: Value

Value element of Table.

Required Associated Constants§

const TABLE: Tables

The dynamic type of the table.

Provided Associated Constants§

const NAME: &'static str = _

The table’s name.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Table for AddressMeta

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "AddressMeta"

§

type Key = Address

§

type Value = AddressMetadataRedefined

source§

impl Table for AddressToProtocolInfo

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "AddressToProtocolInfo"

§

type Key = Address

§

type Value = ProtocolInfoRedefined

source§

impl Table for BlockInfo

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "BlockInfo"

§

type Key = u64

§

type Value = BlockMetadataInnerRedefined

source§

impl Table for Builder

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "Builder"

§

type Key = Address

§

type Value = BuilderInfoRedefined

source§

impl Table for CexPrice

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "CexPrice"

§

type Key = u64

§

type Value = CexPriceMapRedefined

source§

impl Table for CexTrades

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "CexTrades"

§

type Key = u64

§

type Value = CexTradeMapRedefined

source§

impl Table for DexPrice

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "DexPrice"

§

type Key = DexKey

§

type Value = DexQuoteWithIndexRedefined

source§

impl Table for InitializedState

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "InitializedState"

§

type Key = u64

§

type Value = InitializedStateMeta

source§

impl Table for MevBlocks

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "MevBlocks"

§

type Key = u64

§

type Value = MevBlockWithClassifiedRedefined

source§

impl Table for PoolCreationBlocks

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "PoolCreationBlocks"

§

type Key = u64

§

type Value = PoolsToAddressesRedefined

source§

impl Table for SearcherContracts

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "SearcherContracts"

§

type Key = Address

§

type Value = SearcherInfoRedefined

source§

impl Table for SearcherEOAs

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "SearcherEOAs"

§

type Key = Address

§

type Value = SearcherInfoRedefined

source§

impl Table for TokenDecimals

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "TokenDecimals"

§

type Key = Address

§

type Value = TokenInfo

source§

impl Table for TxTraces

source§

const TABLE: Tables = reth_db::Tables::CanonicalHeaders

source§

const NAME: &'static str = "TxTraces"

§

type Key = u64

§

type Value = TxTracesInnerRedefined

§

impl Table for AccountChangeSets

§

const TABLE: Tables = Tables::AccountChangeSets

§

type Key = u64

§

type Value = AccountBeforeTx

§

impl Table for AccountsHistory

§

const TABLE: Tables = Tables::AccountsHistory

§

type Key = ShardedKey<Address>

§

type Value = IntegerList

§

impl Table for AccountsTrie

§

const TABLE: Tables = Tables::AccountsTrie

§

type Key = StoredNibbles

§

type Value = StoredBranchNode

§

impl Table for BlockBodyIndices

§

const TABLE: Tables = Tables::BlockBodyIndices

§

type Key = u64

§

type Value = StoredBlockBodyIndices

§

impl Table for BlockOmmers

§

const TABLE: Tables = Tables::BlockOmmers

§

type Key = u64

§

type Value = StoredBlockOmmers

§

impl Table for BlockWithdrawals

§

const TABLE: Tables = Tables::BlockWithdrawals

§

type Key = u64

§

type Value = StoredBlockWithdrawals

§

impl Table for Bytecodes

§

const TABLE: Tables = Tables::Bytecodes

§

type Key = FixedBytes<32>

§

type Value = Bytecode

§

impl Table for CanonicalHeaders

§

const TABLE: Tables = Tables::CanonicalHeaders

§

type Key = u64

§

type Value = FixedBytes<32>

§

impl Table for HashedAccounts

§

const TABLE: Tables = Tables::HashedAccounts

§

type Key = FixedBytes<32>

§

type Value = Account

§

impl Table for HashedStorages

§

const TABLE: Tables = Tables::HashedStorages

§

type Key = FixedBytes<32>

§

type Value = StorageEntry

§

impl Table for HeaderNumbers

§

const TABLE: Tables = Tables::HeaderNumbers

§

type Key = FixedBytes<32>

§

type Value = u64

§

impl Table for HeaderTerminalDifficulties

§

const TABLE: Tables = Tables::HeaderTerminalDifficulties

§

type Key = u64

§

type Value = CompactU256

§

impl Table for Headers

§

const TABLE: Tables = Tables::Headers

§

type Key = u64

§

type Value = Header

§

impl Table for PlainAccountState

§

const TABLE: Tables = Tables::PlainAccountState

§

type Key = Address

§

type Value = Account

§

impl Table for PlainStorageState

§

const TABLE: Tables = Tables::PlainStorageState

§

type Key = Address

§

type Value = StorageEntry

§

impl Table for PruneCheckpoints

§

const TABLE: Tables = Tables::PruneCheckpoints

§

type Key = PruneSegment

§

type Value = PruneCheckpoint

§

impl Table for Receipts

§

const TABLE: Tables = Tables::Receipts

§

type Key = u64

§

type Value = Receipt

§

impl Table for StageCheckpointProgresses

§

const TABLE: Tables = Tables::StageCheckpointProgresses

§

type Key = String

§

type Value = Vec<u8>

§

impl Table for StageCheckpoints

§

const TABLE: Tables = Tables::StageCheckpoints

§

type Key = String

§

type Value = StageCheckpoint

§

impl Table for StorageChangeSets

§

const TABLE: Tables = Tables::StorageChangeSets

§

type Key = BlockNumberAddress

§

type Value = StorageEntry

§

impl Table for StoragesHistory

§

const TABLE: Tables = Tables::StoragesHistory

§

type Key = StorageShardedKey

§

type Value = IntegerList

§

impl Table for StoragesTrie

§

const TABLE: Tables = Tables::StoragesTrie

§

type Key = FixedBytes<32>

§

type Value = StorageTrieEntry

§

impl Table for TransactionBlocks

§

const TABLE: Tables = Tables::TransactionBlocks

§

type Key = u64

§

type Value = u64

§

impl Table for TransactionHashNumbers

§

const TABLE: Tables = Tables::TransactionHashNumbers

§

type Key = FixedBytes<32>

§

type Value = u64

§

impl Table for TransactionSenders

§

const TABLE: Tables = Tables::TransactionSenders

§

type Key = u64

§

type Value = Address

§

impl Table for Transactions

§

const TABLE: Tables = Tables::Transactions

§

type Key = u64

§

type Value = TransactionSignedNoHash

§

impl Table for VersionHistory

§

const TABLE: Tables = Tables::VersionHistory

§

type Key = u64

§

type Value = ClientVersion

§

impl<T> Table for RawDupSort<T>
where T: DupSort,

§

const TABLE: Tables = T::TABLE

§

type Key = RawKey<<T as Table>::Key>

§

type Value = RawValue<<T as Table>::Value>

§

impl<T> Table for RawTable<T>
where T: Table,

§

const TABLE: Tables = T::TABLE

§

type Key = RawKey<<T as Table>::Key>

§

type Value = RawValue<<T as Table>::Value>