cuprate_blockchain::tables

Trait Tables

Source
pub trait Tables {
Show 23 methods // Required methods fn block_header_blobs(&self) -> &impl DatabaseRo<BlockHeaderBlobs>; fn block_txs_hashes(&self) -> &impl DatabaseRo<BlockTxsHashes>; fn block_heights(&self) -> &impl DatabaseRo<BlockHeights>; fn block_infos(&self) -> &impl DatabaseRo<BlockInfos>; fn key_images(&self) -> &impl DatabaseRo<KeyImages>; fn num_outputs(&self) -> &impl DatabaseRo<NumOutputs>; fn outputs(&self) -> &impl DatabaseRo<Outputs>; fn pruned_tx_blobs(&self) -> &impl DatabaseRo<PrunedTxBlobs>; fn prunable_tx_blobs(&self) -> &impl DatabaseRo<PrunableTxBlobs>; fn prunable_hashes(&self) -> &impl DatabaseRo<PrunableHashes>; fn rct_outputs(&self) -> &impl DatabaseRo<RctOutputs>; fn tx_blobs(&self) -> &impl DatabaseRo<TxBlobs>; fn tx_ids(&self) -> &impl DatabaseRo<TxIds>; fn tx_heights(&self) -> &impl DatabaseRo<TxHeights>; fn tx_outputs(&self) -> &impl DatabaseRo<TxOutputs>; fn tx_unlock_time(&self) -> &impl DatabaseRo<TxUnlockTime>; fn alt_chain_infos(&self) -> &impl DatabaseRo<AltChainInfos>; fn alt_block_heights(&self) -> &impl DatabaseRo<AltBlockHeights>; fn alt_blocks_info(&self) -> &impl DatabaseRo<AltBlocksInfo>; fn alt_block_blobs(&self) -> &impl DatabaseRo<AltBlockBlobs>; fn alt_transaction_blobs(&self) -> &impl DatabaseRo<AltTransactionBlobs>; fn alt_transaction_infos(&self) -> &impl DatabaseRo<AltTransactionInfos>; fn all_tables_empty(&self) -> Result<bool, RuntimeError>;
}
Expand description

Object containing all opened Tables in read-only mode.

This is an encapsulated object that contains all available Table’s in read-only mode.

It is a Sealed trait and is only implemented on a (tuple, containing, all, table, types, ...).

This is used to return a single object from functions like OpenTables::open_tables rather than the tuple containing the tables itself.

To replace tuple.0 style indexing, field_accessor_functions() are provided on this trait, which essentially map the object to fields containing the particular database table, for example:

let tables = open_tables();

// The accessor function `block_infos()` returns the field
// containing an open database table for `BlockInfos`.
let _ = tables.block_infos();

See also:

Required Methods§

Source

fn block_header_blobs(&self) -> &impl DatabaseRo<BlockHeaderBlobs>

Access an opened BlockHeaderBlobs database.

Source

fn block_txs_hashes(&self) -> &impl DatabaseRo<BlockTxsHashes>

Access an opened BlockTxsHashes database.

Source

fn block_heights(&self) -> &impl DatabaseRo<BlockHeights>

Access an opened BlockHeights database.

Source

fn block_infos(&self) -> &impl DatabaseRo<BlockInfos>

Access an opened BlockInfos database.

Source

fn key_images(&self) -> &impl DatabaseRo<KeyImages>

Access an opened KeyImages database.

Source

fn num_outputs(&self) -> &impl DatabaseRo<NumOutputs>

Access an opened NumOutputs database.

Source

fn outputs(&self) -> &impl DatabaseRo<Outputs>

Access an opened Outputs database.

Source

fn pruned_tx_blobs(&self) -> &impl DatabaseRo<PrunedTxBlobs>

Access an opened PrunedTxBlobs database.

Source

fn prunable_tx_blobs(&self) -> &impl DatabaseRo<PrunableTxBlobs>

Access an opened PrunableTxBlobs database.

Source

fn prunable_hashes(&self) -> &impl DatabaseRo<PrunableHashes>

Access an opened PrunableHashes database.

Source

fn rct_outputs(&self) -> &impl DatabaseRo<RctOutputs>

Access an opened RctOutputs database.

Source

fn tx_blobs(&self) -> &impl DatabaseRo<TxBlobs>

Access an opened TxBlobs database.

Source

fn tx_ids(&self) -> &impl DatabaseRo<TxIds>

Access an opened TxIds database.

Source

fn tx_heights(&self) -> &impl DatabaseRo<TxHeights>

Access an opened TxHeights database.

Source

fn tx_outputs(&self) -> &impl DatabaseRo<TxOutputs>

Access an opened TxOutputs database.

Source

fn tx_unlock_time(&self) -> &impl DatabaseRo<TxUnlockTime>

Access an opened TxUnlockTime database.

Source

fn alt_chain_infos(&self) -> &impl DatabaseRo<AltChainInfos>

Access an opened AltChainInfos database.

Source

fn alt_block_heights(&self) -> &impl DatabaseRo<AltBlockHeights>

Access an opened AltBlockHeights database.

Source

fn alt_blocks_info(&self) -> &impl DatabaseRo<AltBlocksInfo>

Access an opened AltBlocksInfo database.

Source

fn alt_block_blobs(&self) -> &impl DatabaseRo<AltBlockBlobs>

Access an opened AltBlockBlobs database.

Source

fn alt_transaction_blobs(&self) -> &impl DatabaseRo<AltTransactionBlobs>

Access an opened AltTransactionBlobs database.

Source

fn alt_transaction_infos(&self) -> &impl DatabaseRo<AltTransactionInfos>

Access an opened AltTransactionInfos database.

Source

fn all_tables_empty(&self) -> Result<bool, RuntimeError>

This returns true if all tables are empty.

§Errors

This returns errors on regular database errors.

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.

Implementations on Foreign Types§

Source§

impl<BLOCKHEADERBLOBS, BLOCKTXSHASHES, BLOCKHEIGHTS, BLOCKINFOS, KEYIMAGES, NUMOUTPUTS, OUTPUTS, PRUNEDTXBLOBS, PRUNABLETXBLOBS, PRUNABLEHASHES, RCTOUTPUTS, TXBLOBS, TXIDS, TXHEIGHTS, TXOUTPUTS, TXUNLOCKTIME, ALTCHAININFOS, ALTBLOCKHEIGHTS, ALTBLOCKSINFO, ALTBLOCKBLOBS, ALTTRANSACTIONBLOBS, ALTTRANSACTIONINFOS> Tables for (BLOCKHEADERBLOBS, BLOCKTXSHASHES, BLOCKHEIGHTS, BLOCKINFOS, KEYIMAGES, NUMOUTPUTS, OUTPUTS, PRUNEDTXBLOBS, PRUNABLETXBLOBS, PRUNABLEHASHES, RCTOUTPUTS, TXBLOBS, TXIDS, TXHEIGHTS, TXOUTPUTS, TXUNLOCKTIME, ALTCHAININFOS, ALTBLOCKHEIGHTS, ALTBLOCKSINFO, ALTBLOCKBLOBS, ALTTRANSACTIONBLOBS, ALTTRANSACTIONINFOS)
where BLOCKHEADERBLOBS: DatabaseRo<BlockHeaderBlobs>, BLOCKTXSHASHES: DatabaseRo<BlockTxsHashes>, BLOCKHEIGHTS: DatabaseRo<BlockHeights>, BLOCKINFOS: DatabaseRo<BlockInfos>, KEYIMAGES: DatabaseRo<KeyImages>, NUMOUTPUTS: DatabaseRo<NumOutputs>, OUTPUTS: DatabaseRo<Outputs>, PRUNEDTXBLOBS: DatabaseRo<PrunedTxBlobs>, PRUNABLETXBLOBS: DatabaseRo<PrunableTxBlobs>, PRUNABLEHASHES: DatabaseRo<PrunableHashes>, RCTOUTPUTS: DatabaseRo<RctOutputs>, TXBLOBS: DatabaseRo<TxBlobs>, TXIDS: DatabaseRo<TxIds>, TXHEIGHTS: DatabaseRo<TxHeights>, TXOUTPUTS: DatabaseRo<TxOutputs>, TXUNLOCKTIME: DatabaseRo<TxUnlockTime>, ALTCHAININFOS: DatabaseRo<AltChainInfos>, ALTBLOCKHEIGHTS: DatabaseRo<AltBlockHeights>, ALTBLOCKSINFO: DatabaseRo<AltBlocksInfo>, ALTBLOCKBLOBS: DatabaseRo<AltBlockBlobs>, ALTTRANSACTIONBLOBS: DatabaseRo<AltTransactionBlobs>, ALTTRANSACTIONINFOS: DatabaseRo<AltTransactionInfos>,

Source§

fn block_header_blobs(&self) -> &impl DatabaseRo<BlockHeaderBlobs>

Source§

fn block_txs_hashes(&self) -> &impl DatabaseRo<BlockTxsHashes>

Source§

fn block_heights(&self) -> &impl DatabaseRo<BlockHeights>

Source§

fn block_infos(&self) -> &impl DatabaseRo<BlockInfos>

Source§

fn key_images(&self) -> &impl DatabaseRo<KeyImages>

Source§

fn num_outputs(&self) -> &impl DatabaseRo<NumOutputs>

Source§

fn outputs(&self) -> &impl DatabaseRo<Outputs>

Source§

fn pruned_tx_blobs(&self) -> &impl DatabaseRo<PrunedTxBlobs>

Source§

fn prunable_tx_blobs(&self) -> &impl DatabaseRo<PrunableTxBlobs>

Source§

fn prunable_hashes(&self) -> &impl DatabaseRo<PrunableHashes>

Source§

fn rct_outputs(&self) -> &impl DatabaseRo<RctOutputs>

Source§

fn tx_blobs(&self) -> &impl DatabaseRo<TxBlobs>

Source§

fn tx_ids(&self) -> &impl DatabaseRo<TxIds>

Source§

fn tx_heights(&self) -> &impl DatabaseRo<TxHeights>

Source§

fn tx_outputs(&self) -> &impl DatabaseRo<TxOutputs>

Source§

fn tx_unlock_time(&self) -> &impl DatabaseRo<TxUnlockTime>

Source§

fn alt_chain_infos(&self) -> &impl DatabaseRo<AltChainInfos>

Source§

fn alt_block_heights(&self) -> &impl DatabaseRo<AltBlockHeights>

Source§

fn alt_blocks_info(&self) -> &impl DatabaseRo<AltBlocksInfo>

Source§

fn alt_block_blobs(&self) -> &impl DatabaseRo<AltBlockBlobs>

Source§

fn alt_transaction_blobs(&self) -> &impl DatabaseRo<AltTransactionBlobs>

Source§

fn alt_transaction_infos(&self) -> &impl DatabaseRo<AltTransactionInfos>

Source§

fn all_tables_empty(&self) -> Result<bool, RuntimeError>

Implementors§