sui_indexer::store::indexer_store

Trait IndexerStore

Source
pub trait IndexerStore:
    Clone
    + Sync
    + Send
    + 'static {
Show 29 methods // Required methods fn get_latest_checkpoint_sequence_number<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<u64>, IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_available_epoch_range<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(u64, u64), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_available_checkpoint_range<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(u64, u64), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_latest_object_snapshot_checkpoint_sequence_number<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<u64>, IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_chain_identifier<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_protocol_configs_and_feature_flags<'life0, 'async_trait>( &'life0 self, chain_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_objects<'life0, 'async_trait>( &'life0 self, object_changes: Vec<TransactionObjectChangesToCommit>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_object_history<'life0, 'async_trait>( &'life0 self, object_changes: Vec<TransactionObjectChangesToCommit>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_full_objects_history<'life0, 'async_trait>( &'life0 self, object_changes: Vec<TransactionObjectChangesToCommit>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_objects_version<'life0, 'async_trait>( &'life0 self, object_versions: Vec<StoredObjectVersion>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_objects_snapshot<'life0, 'async_trait>( &'life0 self, object_changes: Vec<TransactionObjectChangesToCommit>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_checkpoints<'life0, 'async_trait>( &'life0 self, checkpoints: Vec<IndexedCheckpoint>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_chain_identifier<'life0, 'async_trait>( &'life0 self, checkpoint_digest: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_transactions<'life0, 'async_trait>( &'life0 self, transactions: Vec<IndexedTransaction>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_tx_indices<'life0, 'async_trait>( &'life0 self, indices: Vec<TxIndex>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_events<'life0, 'async_trait>( &'life0 self, events: Vec<IndexedEvent>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_event_indices<'life0, 'async_trait>( &'life0 self, event_indices: Vec<EventIndex>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_displays<'life0, 'async_trait>( &'life0 self, display_updates: BTreeMap<String, StoredDisplay>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_packages<'life0, 'async_trait>( &'life0 self, packages: Vec<IndexedPackage>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_epoch<'life0, 'async_trait>( &'life0 self, epoch: EpochToCommit, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn advance_epoch<'life0, 'async_trait>( &'life0 self, epoch: EpochToCommit, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn prune_epoch<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_network_total_transactions_by_end_of_epoch<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<u64>, IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn upload_display<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn restore_display<'life0, 'async_trait>( &'life0 self, bytes: Bytes, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn persist_raw_checkpoints<'life0, 'async_trait>( &'life0 self, checkpoints: Vec<StoredRawCheckpoint>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_watermarks_upper_bound<'life0, 'async_trait, E>( &'life0 self, watermark: CommitterWatermark, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where E::Iterator: Iterator<Item: AsRef<str>>, E: 'async_trait + IntoEnumIterator, Self: 'async_trait, 'life0: 'async_trait; fn update_watermarks_lower_bound<'life0, 'async_trait>( &'life0 self, watermarks: Vec<(PrunableTable, u64)>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_watermarks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(Vec<StoredWatermark>, i64), IndexerError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}

Required Methods§

Source

fn get_latest_checkpoint_sequence_number<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<u64>, IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_available_epoch_range<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(u64, u64), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_available_checkpoint_range<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(u64, u64), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_latest_object_snapshot_checkpoint_sequence_number<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<u64>, IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_chain_identifier<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_protocol_configs_and_feature_flags<'life0, 'async_trait>( &'life0 self, chain_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_objects<'life0, 'async_trait>( &'life0 self, object_changes: Vec<TransactionObjectChangesToCommit>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_object_history<'life0, 'async_trait>( &'life0 self, object_changes: Vec<TransactionObjectChangesToCommit>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_full_objects_history<'life0, 'async_trait>( &'life0 self, object_changes: Vec<TransactionObjectChangesToCommit>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_objects_version<'life0, 'async_trait>( &'life0 self, object_versions: Vec<StoredObjectVersion>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_objects_snapshot<'life0, 'async_trait>( &'life0 self, object_changes: Vec<TransactionObjectChangesToCommit>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_checkpoints<'life0, 'async_trait>( &'life0 self, checkpoints: Vec<IndexedCheckpoint>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_chain_identifier<'life0, 'async_trait>( &'life0 self, checkpoint_digest: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_transactions<'life0, 'async_trait>( &'life0 self, transactions: Vec<IndexedTransaction>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_tx_indices<'life0, 'async_trait>( &'life0 self, indices: Vec<TxIndex>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_events<'life0, 'async_trait>( &'life0 self, events: Vec<IndexedEvent>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_event_indices<'life0, 'async_trait>( &'life0 self, event_indices: Vec<EventIndex>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_displays<'life0, 'async_trait>( &'life0 self, display_updates: BTreeMap<String, StoredDisplay>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_packages<'life0, 'async_trait>( &'life0 self, packages: Vec<IndexedPackage>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_epoch<'life0, 'async_trait>( &'life0 self, epoch: EpochToCommit, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Updates the current epoch with end-of-epoch data, and writes a new epoch to the database.

Source

fn advance_epoch<'life0, 'async_trait>( &'life0 self, epoch: EpochToCommit, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Updates epoch-partitioned tables to accept data from the new epoch.

Source

fn prune_epoch<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_network_total_transactions_by_end_of_epoch<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<u64>, IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn upload_display<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn restore_display<'life0, 'async_trait>( &'life0 self, bytes: Bytes, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn persist_raw_checkpoints<'life0, 'async_trait>( &'life0 self, checkpoints: Vec<StoredRawCheckpoint>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_watermarks_upper_bound<'life0, 'async_trait, E>( &'life0 self, watermark: CommitterWatermark, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where E::Iterator: Iterator<Item: AsRef<str>>, E: 'async_trait + IntoEnumIterator, Self: 'async_trait, 'life0: 'async_trait,

Update the upper bound of the watermarks for the given tables.

Source

fn update_watermarks_lower_bound<'life0, 'async_trait>( &'life0 self, watermarks: Vec<(PrunableTable, u64)>, ) -> Pin<Box<dyn Future<Output = Result<(), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Updates each watermark entry’s lower bounds per the list of tables and their new epoch lower bounds.

Source

fn get_watermarks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(Vec<StoredWatermark>, i64), IndexerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Load all watermark entries from the store, and the latest timestamp from the db.

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§